Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EWM] parallel and remote workflows
[EWM] parallel and remote workflows [message #620893] Thu, 30 April 2009 01:27
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
When I was developing the EMF workflow model, I experienced a momentary
lapse in intelligence ... I forgot that EMF datastructures are not
thread safe. This means that the current EMF workflow model will not
work for parallel workflows.

I've been thinking I would use EMF Transaction to update the workflow
context which would give me the thread safety that is needed. However,
I've recently found a use-case that doesn't seem to fit the transaction
model. I have a requirement to execute a workflow component (which
could be any subtree of the workflow) remotely.

The solution I have in mind for executing a workflow component remotely
is to clone the context and send it to a remote agent that would then
execute the workflow starting at that node. The "master" workflow
would set the remote node's state to something like "Suspended" and
terminate. The remote workflow would execute until it completed or
reached another remote component - wash - rinse - repeat. The reason
for setting the "master" node's state to "Suspended" is so that if the
workflow get's killed, previous work is not lost. In the typical case,
the workflow context will be persisted to a central location and
updated by the workflow as it progresses. I'll have to come up with a
scheme for merging the contexts in the case of remote parallel
workflows, and I think EMF ChangeRecorder will be involved in the
solution. I suppose you could think of this like a worm traveling from
host to host until execution is complete. I rather like this solution
as it seems very RESTful.

Now, getting back to the issue of cloning the context - that must be
thread-safe, and I really don't want to write a clone function that
uses a transaction. The easiest solution seems to be some sort of
master lock on the entire workflow context where I could lock the
entire context, access the context, and then unlock the context. This
locking mechanism would allow me to clone the context in a thread-safe
manner to support remote execution, and provide the thread safety
needed for parallel workflows. This locking mechanism would be
transparent to the user.

This is a fairly major change, so I wanted to see if there were any
comments before I started changing the code.

Bryan
Previous Topic:Weak comparison - can't match nodes, when nested
Next Topic:[EWM] parallel and remote workflows
Goto Forum:
  


Current Time: Fri Apr 26 06:31:38 GMT 2024

Powered by FUDForum. Page generated in 0.02850 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top