[saga-rg] task model question

Andre Merzky andre at merzky.net
Tue Oct 4 07:45:25 CDT 2005


Hi all, 

I added another issue, and would welcome comments.

Cheers, Andre.

  63) should there be a method:

      task.get_task_factory ()

      which returns the tf which created the task?  GridRPC has a
      similar method call, and it seems to make it much easier to keep
      track of tasks.  E.g. one could start a remote read task, and
      when that is finished start another read:

      saga::file f (url);
      saga::file::task_factory ftf = file.get_task_factory ();

      saga::task t = ftf.read (100, out);

      t.run ();

      ... // do may things

      if ( saga::task::Done = t.get_status () )
      {
        // ok, do another read on that one...
        saga::file::task_factory ftf = t.get_task_factory ();
        ftf.read (100, out2);
      }

      That would be VERY useful for task containers, e.g. if 1 of n
      tasks finishes, and requires a follow up call on the same task
      factory.  Right now, the user needs to maintain a mapping from
      task to the respective task factory (which is not tooo difficult
      though, just possibly cumbersome).

      However: the problem with that approach is, that the return type
      for the call differs for the various task types!!  So it would
      either require:

        - have specific task types, and have task container
          etc. work on a base class of them (ugh?)
        - have a base task_factory type which gets returned and casted
          (ugh?)


-- 
+-----------------------------------------------------------------+
| Andre Merzky                      | phon: +31 - 20 - 598 - 7759 |
| Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 |
| Dept. of Computer Science         | mail: merzky at cs.vu.nl       |
| De Boelelaan 1083a                | www:  http://www.merzky.net |
| 1081 HV Amsterdam, Netherlands    |                             |
+-----------------------------------------------------------------+





More information about the saga-rg mailing list