Re: looking for asynchronous flow execution framework
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 May 2005 11:24:44 +0100
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
.
- Follow-Ups:
- References:
- looking for asynchronous flow execution framework
- From: ittay . dror
- looking for asynchronous flow execution framework
- Prev by Date: Re: Why Generics?
- Next by Date: Re: eclipse CVS and intellisense
- Previous by thread: looking for asynchronous flow execution framework
- Next by thread: Re: looking for asynchronous flow execution framework
- Index(es):
Relevant Pages
|