[erlang-questions] Calling into Lua from Erlang
Wed Jan 7 21:37:01 CET 2009
An erlang port (reading from stdin/stdout in a separate OS process)
could be used. If there were absolutely no errors, it would be trivial
to switch it to an erlang port driver (running as a VM process in a more
efficient way), but that is at your own risk of being harder to debug.
[mailto:erlang-questions-bounces@REDACTED] On Behalf Of ext PJ Durai
Sent: Wednesday, January 07, 2009 11:27 AM
Subject: Re: [erlang-questions] Calling into Lua from Erlang
Robert Raschke <rtrlists <at> googlemail.com> writes:
> I will need to call Lua scripts from within Erlang soon. I was
> wondering if anyone has already looked into a slightly closer binding
> than calling an external program to run the Lua script and marshalling
> via stdin/out?
> I am currently undecided whether to make the Lua API available to be
> invoked from Erlang (via a linked-in driver) or if it might be more
> useful to write a Lua library that allows a Lua script to function as
> an Erlang node (similar to the Erlang Jinterface lib for Java).
> I would gratefully receive opinions and wisdom on this kind of stuff?
Aren't linked in drivers supposed to be dangerous in general? A bug in
the C code can destabilize Erlang VM.
I would vote for Option 'Lua node'.
You can have multiple Lua VM's on multiple threads processing requests
coming in from Erlang nodes. The possibilities are interesting.
erlang-questions mailing list
More information about the erlang-questions