Continuations for the JVM

With the popularity of Ruby and the impending Open Sourcing of Sun's JVM, it's time to restart efforts to add continuations to the Java VM (which should have had them in the first place).

Languages

Several of the world's best computer language depend on continuations (and hence have had second class implementations on the JVM).

People

People who might be interested and/or able to further this process:

Papers

There are quite a few papers addressing continuation implementation and some that discuss it specifically with regard to the Java VM.

Resources

Migratory Threads

Those folks at INRIA have implemented their migratory threads (which sound like continuations to me) and have instrumented it to demonstrate that they in fact have no overhead. Their work extends the Sun JVM and binaries are freely available. Commercial restrictions and Sun Research license restrictions are a problem.

INRIA Migratory Threads

Sara Bouchenak, Daniel Hagimont, Noel De Palma. Techniques for Implementing Efficient Java Thread Serialization.

Thread Serialization

SERIALIZATION OF DISTRIBUTED THREADS IN JAVA

Persistent Java (PJama)

An early project that implemented a persistent JVM for all Java types (including classes and threads). Moribund because is was bound by the Sun Research License, but with OSS Java perhaps it can be revived.

http://research.sun.com/forest/

http://www.cs.purdue.edu/homes/hosking/pjama.html

http://www.dcs.gla.ac.uk/~susan/

Web Continuations

With the JVM stuck, the implementations of continuations in Java has focused on web containers.

Torsten called for a JSR for adding native support for continuations back in 2004. That didn't seem to get anywhere, but his work on continuation compilation has led to javaflow

Jetty 6 has continuations too
http://java.dzone.com/articles/continuations-continue

RIFE also has web continuations. It is used in WebWork.

Bracha'a blog entry on why Sun won't do continuations has many comments and is the first Google hit for "continuations in the java vm".

Articles

http://rifers.org/wiki/display/RIFE/Web+continuations http://www.elegantchaos.com/taxonomy/term/61

http://www.franklinmint.fm/blog/archives/000246.html

http://www.sauria.com/blog/2004/12/09#1166

JESSICA2

http://i.cs.hku.hk/~wzzhu/jessica2/index.php is a distributed JVM implementing thread migration based on Kaffe.

Unrelated

Note that Continuations are quite different from Closures.

Interview with Neal Gafter made following his presentation about adding closures to Java, http://www-128.ibm.com/developerworks/java/library/j-cb01097.html.