<< Conference Season and Conference Season Announcement Season | Home | DWR 2.0 milestone 2 lets you write Javascript in Java >>

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

That's 6 implementations, and I don't want DWR to have to have hacks for them all.



Re: JSR: Continuations

BTW it was just a wiki I created at codehaus - not an actual implementation.

Re: JSR: Continuations

Round up those people, get someone to take responsibility, and submit the JSR!

Re: JSR: Continuations

Don't forget BpmScript!

Re: JSR: Continuations

Clarification: BpmScript is built on top of the fine continuations framework built into Rhino, rather than a continuations implementation itself.

Re: JSR: Continuations

Also, let me shamelessly promote my own recent contribution to the pool of continuations-enabled systems: Rhino-in-Spring is a continuations-based webflow controller for the Spring framework that uses Rhino.