Rhino是唯一支持沙盒和可序列化延续的解释器吗?

时间:2022-04-16 21:07:03

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.

我需要(a)沙盒,以及(b)可序列化的延续。我正在向用户公开服务器端游戏脚本,并且它非常异步,因此回调模式使代码不可读并且对于新手程序员来说非常不易接近。延续传递风格是另一种选择,但具有相同的缺点。异步是指对用户的查询可能需要数月才能完成。

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

有关我的完整列表,请参见http://weaverengine.com/platforms

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

Serializedable continuation看起来是一个非常优雅的解决方案,但很少有解释器支持它们。

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.

到目前为止,似乎我唯一的选择是Rhino。我希望NodeJS或PyPy可以工作,但迄今为止的证据恰恰相反。

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

Lua似乎支持协同程序,但我找不到任何关于它是否支持可序列化延续的信息。 Lua做沙盒很好。

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

NodeJS让Jefe提供了非常好的沙盒,但到目前为止还没有关于延续序列化的内容。

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.

PyPy还没有改进他们的沙盒和可序列化的延续支持,以便可以在pypy-dev邮件列表中使用它们一起使用。

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.

JavaFlow暗示如果所有类都实现了Serializeable,那么可以序列化java continuation。但除非我能在JavaFlow上运行一个很好的动态语言解释器,否则我不感兴趣。

Is Java and Rhino my only option?

Java和Rhino是我唯一的选择吗?

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

NodeJS的分支是否有持续支持?任何符合这些标准的合理的动态语言?

3 个解决方案

#1


2  

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.

我很惊讶你没有提到Scheme,因为那是开创性的延续语言。例如,SISC是在JVM上运行的Scheme解释器,它支持可序列化的延续。这些用于例如SISCweb框架中。

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

对于沙盒,您可以使用jvm的内置安全功能。

#2


0  

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

应该可以在Gambit-C中序列化continuation。

#3


0  

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

我最终使用了Lua 5.1.4和Pluto。到目前为止似乎是一个不错的选择。

#1


2  

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.

我很惊讶你没有提到Scheme,因为那是开创性的延续语言。例如,SISC是在JVM上运行的Scheme解释器,它支持可序列化的延续。这些用于例如SISCweb框架中。

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

对于沙盒,您可以使用jvm的内置安全功能。

#2


0  

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

应该可以在Gambit-C中序列化continuation。

#3


0  

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

我最终使用了Lua 5.1.4和Pluto。到目前为止似乎是一个不错的选择。