Re: looking for asynchronous flow execution framework



ittay.dror@xxxxxxxxx wrote:

> I'm looking for a framework that would be able to execute a given code
> when actions inside the code are asynchronous.

>From your description (snipped) it sounds as if you want to be able to suspend
the state of an executing computation, store it (allowing the thread to go do
something else), and then resume it later, rather than -- say -- just making
the executing thread wait for a long period.

If so then what you are really looking for is "continuations" (for which, see
Google), and Java doesn't do continuations. In fact it /can't/ unless it's
running on a custom JVM, since the standard JVM spec doesn't allow that kind of
manipulation of the execution stack.

For that reason, I doubt if there's any general-purpose framework that will do
just what you want.

I think that you'll have to re-think your architecture to make it more
"event-driven". For instance, your AiroplaneLifecycle object would expose
preFlightMaintanance(), fly(), and postFlightMaintanance(), as top-level
methods that the framework would call in response to external events.
The object could just be stored in a quiescent state (or even serialised and
saved to disk) in between events.

Presumable a general-purpose framework could be built to support that kind of
architecture, and I imagine that such things do exist, but I'm afraid that I
personally don't know of any.

-- chris




.



Relevant Pages

  • Re: looking for asynchronous flow execution framework
    ... the executing thread wait for a long period. ... I doubt if there's any general-purpose framework that will do ... your AiroplaneLifecycle object would expose ... methods that the framework would call in response to external events. ...
    (comp.lang.java.programmer)
  • Re: looking for asynchronous flow execution framework
    ... the executing thread wait for a long period. ... I doubt if there's any general-purpose framework that will do ... your AiroplaneLifecycle object would expose ... methods that the framework would call in response to external events. ...
    (comp.lang.java.programmer)
  • Re: looking for asynchronous flow execution framework
    ... We describe a state machine where incoming messages ... the executing thread wait for a long period. ... For instance, your AiroplaneLifecycle object would expose preFlightMaintanance, fly, and postFlightMaintanance, as top-level methods that the framework would call in response to external events. ...
    (comp.lang.java.programmer)
  • Re: Why finally?
    ... I get the same results from executing the code as well. ... This seems to be a definite improvement of V1.x of the framework. ... normal exception paths. ... // Inject an asynchronous ThreadAbortException in the target thread, ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Debugging error message
    ... It's important that when you INSTALL... ... ***i would make sure that you're problem is with Microsoft .NET Framework... ... >> but what all of you should try is to look at the logs... ...
    (microsoft.public.windows.mediacenter)