JSR: Continuations
We need a JSR for Continuations.
I've been working with Greg Wilkins to allow Ajax in DWR to work properly with Jetty Continuations. But Jetty Continuations are just one of a number of implementations of a great idea. We need a JSR so that I don't have to do the same job 20 times:
What is a Continuation?
The best short description I've seen is one from Paul Graham's On Lisp that Brian McCallister referred to.
A continuation is a program frozen in action: a single functional object containing the state of a computation. When the object is evaluated, the stored computation is restarted where it left off. In solving certain types of problems it can be a great help to be able to save the state of a program and restart it later. In multiprocessing, for example, a continuation conveniently represents a suspended process. In nondeterministic search programs, a continuation can represent a node in the search tree.
Brian's whole Continuation blog entry is well worth a read. Sam Ruby has a great article on the subject, or there is also an IBM DeveloperWorks article which goes into a bit more depth or a Wikipedia article.
Implementations
- Continuations are in Rife and this code is used by WebWork.
- Continuations are in JavaFlow. Although this is still in the sand-box.
- Continuations are in Cocoon and the vast eco-system behind that.
- Continuations are in Jetty and DWR has tweaks for this written by Greg Wilkins.
- I've heard that BEA are building continuations into Weblogic too. Can anyone confirm this?
It looks like James Strachan is toying with the idea at Codehaus, but not creating anything.- Continuations are in BPMScript "BPM is used to attempt to automate these business processes".
That's 6 implementations, and I don't want DWR to have to have hacks for them all.