开发者

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?


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.


It should be possible to serialize continuations in Gambit-C.


I ended up using Lua 5.1.4 and Pluto. Seems to be a good choice so far.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜