cparnot / GridEZ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GridEZ

A framework for Mac OS X developers interested in developing an Xgrid-enabled application. The GridEZ.framework provides a set of classes and methods to replace XgridFoundation, the Xgrid framework provided by Apple, and provide the developer with a simpler way of using Xgrid. The GridEZ.framework is used by GridStuffer and Xgrid FUSE to provide the Xgrid functionality.


GridEZ.framework version 0.4.7

Created by Charles Parnot.

Copyright Charles Parnot 2005, 2006, 2007, 2008, 2009. All rights reserved.

Contact: charles.parnot@gmail.com

Read more on the web: http://cmgm.stanford.edu/~cparnot/xgrid-stanford http://cmgm.stanford.edu/~cparnot/xgrid-stanford/html/goodies/ http://cmgm.stanford.edu/~cparnot/xgrid-stanford/html/goodies/GridEZ.html

The GridEZ framework is released under the terms of the modified BSD License. The examples and tests programs distributed with GridEZ are released under the modified BSD License. The GridEZ framework uses the MethodSwizzle code from Tildesoft for debugging. Please read the text of the licenses included with the project for more details.


Changelog

version 0.4.7 (April 2009)

  • The following classes are now public:
    • GEZServerHook
    • GEZGridHook
    • GEZResourceObserver
  • GEZManager fix: the Application Support folder was always created with the name "GridStuffer", now created with a name based on the application that is using GridEZ.

version 0.4.6 (December 2007)

  • Fixes for "Leopard compatibility" (the CoreData validation was not working without these fixes, which could have been considered bugs in Tiger, but were never exposed at runtime, probably due to slight modifications in the way CoreData now works in Leopard):
    • GEZManager fixes
    • GEZJob fixes

Version 0.4.5 (August 2007)

  • Changes in the APIs and behavior relevant for developers using the GridEZ framework (potential changes possible in their code):

    • allows public access to the NSWindow object for the "Xgrid Controllers" window, through a method in the header of GEZServer. This was useful for the XgridFUSE program.
    • updated GEZJob to use the actual keys for the task names, and not assume they are numbers. At job creation, the tasks are named with numbers. When results are retrieved, the tasks are named with their actual names. If a task does not yield any result, it won't even appear.
    • when adding a remote controller using the ServerWindowController, the sheet used to type the address by the user should be dismissed before starting an interactive connection session and calling GEZConnectionPanelController. Otherwise, observers of the notification GEZServerWillAttemptConnectionNotification may not be able to terminate the application or do other UI stuff.
    • added a GUI method to GEZServer, that allows to initiate a connection session with possible user interaction, for instance asking password,...
    • updated GEZServer to add another notification before connection, and to include GUI-related calls in a separate category of GEZServer, instead of using GEZManager. More to come.
  • Changes in the framework performance and reliability (no need to change anything in apps using the GridEZ framework):

    • fixed a bunch of memory leaks and "CoreData leaks" (see details below)
    • change the status of GEZServerHook to 'disconnected' immediately when the disconnect is called (and not just when XGConnection fails). This way, any unwanted further attempt at connecting should be avoided. The status of GEZServer changes immediately too.
    • the Xgrid connection panel that opens when a connection fails or a password is needed, will now be visible even when switching to another app. This behavior will avoid losing the panel, particularly when the app using it is faceless (e.g. Xgrid FUSE).
    • in some instances, the Xgrid Controller window presented to the user to connect to controllers would not really come to the front. The behavior should be more reliable now.
  • Changes relevant for GridEZ development:

    • added a debugging tool, namely an intermediate subclass for NSManagedObject that gets used by all the GridEZ subclasses of NSManagedObject, but only in Debug builds. That intermediate class, called GRIDEZ_DEBUG_NSManagedObject, can then catch messages and log stuff, etc...
    • fixed a bunch of memory leaks and "CoreData leaks" (aka entity orphaning)
      • fixed issues in the managed object model, where some of the delete rules for relationships were wrong, because it was set to "Nullify" instead of "Cascade". This would result in entities accumulating in the store. The model should still be compatible with older versions.
      • fixed a memory leak in GEZServerHook, a very small one, but I feel better now.
      • fixed a stupid memory leak in GEZResults. The consequence was that NSData object for the uploaded files would stick around, and the memory usage would go up all the time.
      • fixed a bug in GEZMetaJob and GEZJob , to delete GEZProxy and GEZTask objects when not in use anymore. *fixed a bug in GEZIntegerArray, where the dealloc method would modify one of the properties, which could trigger occasional exceptions. This was not apparent before, because the mom was not properly configured, and the object was never dealloced and deleted (see in the coming commits more about that).
    • only call close on the controller for the Xgrid Controllers window if it has already been open, to avoid useless creation of the controller.
    • minor bug fix in a log message, only relevant in Debug build configuration.

Version 0.4.3 (March 2007)

  • Fixed bug in GEZServer that would not properly update 'status' after disconnection

Version 0.4.2 (March 2007)

  • Limited number of concurrent file downlads when retrieving results; by default, the limit is 10, but it can be changed by calling 'setMaxFileDownloads' on GEZManager
  • Fixed bug in GEZJob, that would cause random, relatively rare, crashes

Version 0.4.1 (February 2007)

  • Submission of several metajobs in parallel behaves much better; the limit on the number of submitting jobs per grid now applies to each metajob instead of being a global setting for the grid

Version 0.4.0 (February 2007)

GEZJob:

  • Implemented different modes for retrieving job results. One can choose to only upload the streams, instead of all the files. The results can also be reset or "cleared". This functionality has been added to the GUI of the Xgrid panel as well. The implementation is not very flexible and will need to change at some point if more options are needed.
  • "delegate" is a relationship for GEZJob
  • property "isRunning" changed to "running"
  • fixed bug: would permaturely consider inexistant a just submitted job in some instances
  • fixed bug: deletion by external application was not properly detected and notified to delegate
  • changed implementation to take into account the fact that even after a job submission is successful (XGActionMonitor returns with success), the XGJob is not necessarily yet available in XGGrid, and we have to give XGGrid a chance to be updated before we can get the XGJob
  • bug fix: make sure the GEZGrid used for submission of a GEZJob is in the same managed object context, when using the setGrid: method

GEZServer:

  • Added "autoconnect" property of GEZServer, which will make the server try to autoconnect
  • Properties "isAvailable"...etc... have been renamed "available"...etc... which is more inline with KVC conventions
  • Added missing implementation of the convenience method 'submitJobWithSpecifications:' in GEZGrid and GEZServer. The previous implementation was just returning nil!!
  • Now full support for live update of the list of all jobs in GEZGrid and GEZServer. This is done by having a switch in these objects called 'observeAllJobs', that can be turned on or off. This switch can also be set in the GUI in the Xgrid panel.
  • Added support for storage of password in the user keychain

GEZMetaJob (changes compared to GridStuffer initial implementation):

  • Added GEZMetaJob class to the framework, coming from GridStuffer
  • Smart submission to maximize controller usage and keep it responsive; this is possible by setting a maxNumberOfPendingJobs and maxNumberOfSubmittingJobs; this way, a controller can't become unresponsive as a result of submitting too many jobs; also, when some jobs are running and some pending, it means the grid is full, so we can stop submitting more
  • Submission to several grids at the same time; responds automatically when a grid is added; only use connected grids for submissions, and use all the connected grids when no specific grid has been set using the 'grids' relationship
  • Updated GEZMetaJob data model to have a 'tasksPerJob' attribute, instead of 'maxTasksPerJob' and 'minTasksPerJob'; the user simply decides how many tasks to put per job, when possible

GEZManager and Core Data:

  • Added a method to register additional managed object contexts with GEZManager, so that additional GEZServer objects are also present in the application-wide context. In theory, the user of the framework needs to register a context if she uses some GridEZ object.
  • Added options set in the application Info.plist to enable/disable the NSUndoManager of the main managed object context (by default, disabled), and to allow different formats to be used for the corresponding store.
  • GEZManager now creates a managed object context using all the managed object models available in the bundle.

Misc:

  • Removed some extraneous NSLog from the implementation of GEZIntegerArray
  • Changed terminology: instead of being "Synced", an xgrid resource (job, server, grid) is said to be "Updated", to be consistent with Xgrid terminology. The only problem is that CoreData also has the concept of "isUpdated", so method names would clash if the classes inheriting from NSManagedObject were to implement the method "isUpdated". This was initially why I did not add these methods. I figured this is actually quite a small limitation.
  • GridEZ: renamed the entities in the Core Data model to be the same as the class name, instead of using the "GridEZ_" prefix.
  • Added several calls to 'processPendingChanges' in the model code when inserting new entitites, mostly to force better updates in the GUI.
  • Now using a better mechanism to determine when a resource is updated the first time it syncs with the controller; this makes use of a separate class GEZResourceObserver that keeps KVO on the key "updated" of an XGResource. This mechanism is used in GEZGridHook, GEZServerHook and GEZJob.
  • bug fix: jobSpecification would not always be released when needed in GEZJob after the submission. The fix was to simply release it right after submission to the XGController, and not wait for submission to be successful or to fail.
  • bug fix: when server disconnected while job is submitted, should do something to kill the submission. Bug was reported by James Reynolds, and I need to check with him that the fix does the job. The fix works as follows: when a grid is finally chosen, get notified of server disconnection so we can invalidate the job if that happens while submission is still ongoing.
  • Corrected a typo/bug : the identifier for the notifications GEZGridHookDidChangeNameNotification and GEZGridHookDidChangeJobsNotification were set to identical strings
  • Systematically looked for potential memory leaks in the dealloc implementations. There were a bunch of them, yikes!

User interface

  • Controller Window: list grids under the controller using an NSOutlineView
  • Controller Window: using a toolbar for connection, deconnection, adding/removing (the toolbar can't be hidden and the buttons can't be removed and reordered)
  • Controller Window: the whole window is now just a list of servers; the user must use the '+' button to add more controllers
  • Controller Window: removed extra column with last connection time (useless!)
  • Connection dialogs are now done through a connection panel resembling the connection panel shown by the Finder when connecting to a server. Added Keychain support there.
  • Controller Window and Xgrid Panel: allow double-clik of controller to trigger connections
  • Controller Window and Xgrid Panel: added keyboard shortcut to use the 'Delete' key for deletion of servers and jobs
  • Do not allow the user to add a server with address = empty string.
  • XGrid Panel now shows the job ids in the job table view
  • XGrid Panel allows to retrieve job results. One can choose to only upload the streams, instead of all the files. The results can also be reset or "cleared".
  • Controller Window: "autoconnect" feature accessible thru contextual menu
  • Xgrid panel: "autoconnect" feature accessible in inspector

Version 0.3.0 (April 2006)

  • First public release

About

License:Other


Languages

Language:Objective-C 99.8%Language:Ruby 0.2%