Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Rhino the only interpreter with support for sandboxing and serializable continuations?

I need (a) sandboxing, and (b) serializeable continuations. I'm exposing server-side game scripting to users, and it is extremely async, thus the callback pattern makes code un-readable and very un-approachable for newbie programmers. A continuation-passing style is an alternative, but has the same drawbacks. Async in the sense that a query to the user may take months to complete.

See http://weaverengine.com/platforms for my full list

Serializeable continuations seem like a very elegant solution, but few interpreters support them.

So far, it seems that my only option is Rhino. I was hoping that NodeJS or PyPy would work, but the evidence so far points to the contrary.

Lua seems to support coroutines, but I can't find any information on whether it supports serializeable continuations. Lua does sandboxing well.

NodeJS has Jefe to offer really nice sandboxing, but nothing so far regarding continuation serialization.

PyPy also hasn't yet refined their sandboxing and serializeable continuation support to the point where they can be used together, from what I understood on the pypy-dev mailing list.

JavaFlow hints that if all classes implement Serializeable, then java continuations could be serialized. But unless I can run an interpreter for a nice dynamic language on top of JavaFlow, I'm not interested.

Is Java and Rhino my only option?

Is there a branch of NodeJS with continuation support? Any reasonably nice, dynamic language that meets these criteria?

like image 676
Lilith River Avatar asked Mar 07 '11 15:03

Lilith River


1 Answers

I'm suprised you did not mention Scheme, as that is the language where continuations where pioneered. SISC for example is a Scheme interpreter running on the JVM that supports serializable continuations. These are used for example in the SISCweb framework.

For sandboxing you could use the builtin security features of the jvm.

like image 195
Jörn Horstmann Avatar answered Sep 19 '22 10:09

Jörn Horstmann