Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuations in Java

Is there a good implementation of continuations in Java?

If so, what is the overhead like? The JVM wasn't designed with these sort of things in mind, right? So is this kind of going against the grain?

like image 655
Mike Avatar asked Sep 21 '09 18:09

Mike


3 Answers

See Apache Javaflow http://commons.apache.org/sandbox/javaflow/

It's the only continuation package for java that's actively under development. The other one, RIFE, I'm not sure which state it's in.

like image 121
gawi Avatar answered Nov 16 '22 12:11

gawi


Javaflow http://commons.apache.org/sandbox/javaflow/ Play framework use Javaflow http://blog.heroku.com/archives/2011/8/29/play/

RIFE http://www.artima.com/lejava/articles/continuations.html WebWork use.

JauVM http://jauvm.blogspot.com/2005/07/so-what-does-it-do.html JVM in JVM, implements tail call / continuation

Scala 2.8 http://www.scala-lang.org/node/2096

Cocoon http://cocoon.apache.org/2.1/userdocs/flow/continuations.html http://wiki.apache.org/cocoon/RhinoWithContinuations

Jetty http://docs.codehaus.org/display/JETTY/Continuations retry request.

coroutines http://code.google.com/p/coroutines

jconts https://github.com/idubrov/jconts

jyield http://code.google.com/p/jyield

Kilim http://www.malhar.net/sriram/kilim/thread_of_ones_own.pdf

ATCT http://portal.acm.org/ft_gateway.cfm?id=949362

like image 45
Jerry Chan Avatar answered Nov 16 '22 13:11

Jerry Chan


Jetty has continuation support. There is further discussion and some samples at DZone.

I can't advise on the efficiencies or otherwise, other than to say that the Mortbay team always appear concious of such issues. There will most likely be a discussion of implementation trade-offs somewhere on the Jetty site.

like image 7
Brian Agnew Avatar answered Nov 16 '22 12:11

Brian Agnew