Embedding in an application

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Thu Jun 5 11:58:13 CEST 2003


Hi,

----- Original Message ----- 
> Is it possible to embed the Erlang/OTP in another application?  I'm
> looking to use a language to script parts of an application and am
> wondering if anyone has done this or if it's even possible?  I am
> considering Lua, Javascript and Haskell but wondered if it's possible
> with the Erlang system.

I may be wrong here, but when I researched the same topic, this is what I
came up to:

It is certainly possible, but it's not the funniest thing to do :-) Beam is
a dynamic library, so any program can use it. However, one can only talk to
the shell then, I think.

The best way is to let Erlang and the application be separate and talk
either via a port, or a TCP connection. You will have to design a protocol,
and convert the data from Erlang to whatever language your app is written
in, and back. As wire data format, the Erlang external format is a
possibility; UBF is another. Or you can use your own.

I'm not sure this answers all your wonderings, but I hope it gives an
indication.
regards,
Vlad



More information about the erlang-questions mailing list