[erlang-questions] erlang/python,ruby,.. interfaces on tcp

Robert Raschke rtrlists@REDACTED
Mon Aug 10 10:56:11 CEST 2009


On Mon, Aug 10, 2009 at 9:42 AM, Roberto Ostinelli <roberto@REDACTED>wrote:

> dear all,
>
> an old question here: i'd like to interface erlang with python, ruby, and
> other languages as i go. i am aware of the existance of port drivers
> however:
>
> . you need to develop one for each erlang / other language couple;
> . a crash in the port driver brings the emulator down too.
>
> therefore, i'm thinking to use a binary protocol over tcp/ip. this allows:
>
> . to have only a single exit/entry point from erlang structured as a tcp
> server;
> . to avoid crashing the emulator if something goes wrong in the client.
>
> since communication between erlang nodes is done by tcp, i think this could
> be an interesting thing to try out.
>
> questions:
>
> 1. do you think that this is worth a try, or you'd better really be off
> with
> port drivers? i know there's one for ruby
> http://github.com/mojombo/erlectricity/tree/master for instance.
>
> 2. what kind of fast binary protocol would you recommend?
>
> thank you,
>
> r.
>
>
Have you had a look into implementing the native Erlang messaging protocol?
The Jinterface Java code should be a good guide for this.

And the binary format of Erlang terms is explained in
http://www.erlang.org/doc/apps/erts/erl_ext_dist.html (forms section 8 of
http://www.erlang.org/doc/apps/erts/part_frame.html). You could implement
you own protocol, but use the Erlang term format for the values.

Robby


More information about the erlang-questions mailing list