[Vortex] Rebol Script-Binding / Callback Problem

Sam Roberts vieuxtech at gmail.com
Mon Mar 14 19:22:59 CET 2011


> 1. Is there a way to run Vortex without multi-threading?

Most interpreter cores don't support multithreading in a way that's at
all helpful with libraries like vortex. Python is exceptional in that
it does, with a global lock.

I tried to bind vortex into lua, which I suspect has the same
structure as rebol (which I've looked at briefly, but years ago,
thought it was dead, actually).

I think the only way to work this is to write a multithreaded library
that implements a single-threaded interface to vortex, and where all
callback responses are queued up to be handled by a single thread, and
that single thread interacts with the interpreter core. Doing this and
exposing the full vortex API is hard, but if you limit your API to a
small set of interactions, it might not be too bad. You'd basically
"post" requests to your lib, and "pull" responses back from it when
it's ready.


You can try to use swirl as a base, if you _really_ want this in
rebol, its based on the non-threaded beepcore-c:

https://github.com/sam-github/swirl

IMO, the easiest way to use vortex/beep from rebol or any other
language would probably be to write an http/json-rpc server that
gateways to beep. Most languages allow parallel interactions with http
servers (usually using poll, or other event notification facilities)
natively, and you could take advantage of vortex's beep
implementation. Of course, you'd have to find an embedded C or C++
http server library, but those exist.

Cheers,
Sam


More information about the Vortex mailing list