Hibernating python programs?

Chui Tey teyc at bigfoot.com
Wed Jan 24 00:42:43 EST 2001


Just wondering aloud, if it is possible to hibernate running python scripts
by pickling all the elements in the main namespace. and then by some magic
save the position of the instruction pointer. Resurrecting the script can
then take place by a similar process in reverse.

Application of this technique:

In workflow programs, where business logic take days or weeks to wait for
the next event to fire, if we can save the state of the script, we can:

a) resurrect scripts in the event of a power failure
b) move running scripts to a different machine
c) notify a rule engine of events which it is interested in, then hibernate.
The rule engine can then wake up the hibernating script using a callback.





More information about the Python-list mailing list