I
ittay.dror
Hi,
I'm looking for a framework that would be able to execute a given code
when actions inside the code are asynchronous.
For example, imagine a software for managing the activities of an
airline company. A code there could look like:
AirplaneLifecycle() {
preFlightMaintanance();
fly();
postFlightMaintanance();
}
all of the above actions trigger physical activities in the external
world, the execution waits, effectively, the thread that handled it
returns. These activities end when an event is sent back to the
framework. This then resumes the execution of the code.
More elaborately, preFlightMaintanance() will, for example, send an SMS
to the chief technician and inform the framwork to wait for the
'pre_flight_maintanance_complete' event. The thread of execution will
finish. When the pre_flight_maintanance_complete event arrives, the
execution will continue where it left off, and call fly() etc.
To me, this sounds very much like what a JVM does. It accepts code and
can stop executing it at any time, continuing later from where it left
off. The difference is that I need specific events to cause the
continuation of the execution. Maybe the framework I'm looking for is
an embedded JVM?
Thanx,
Ittay
I'm looking for a framework that would be able to execute a given code
when actions inside the code are asynchronous.
For example, imagine a software for managing the activities of an
airline company. A code there could look like:
AirplaneLifecycle() {
preFlightMaintanance();
fly();
postFlightMaintanance();
}
all of the above actions trigger physical activities in the external
world, the execution waits, effectively, the thread that handled it
returns. These activities end when an event is sent back to the
framework. This then resumes the execution of the code.
More elaborately, preFlightMaintanance() will, for example, send an SMS
to the chief technician and inform the framwork to wait for the
'pre_flight_maintanance_complete' event. The thread of execution will
finish. When the pre_flight_maintanance_complete event arrives, the
execution will continue where it left off, and call fly() etc.
To me, this sounds very much like what a JVM does. It accepts code and
can stop executing it at any time, continuing later from where it left
off. The difference is that I need specific events to cause the
continuation of the execution. Maybe the framework I'm looking for is
an embedded JVM?
Thanx,
Ittay