[erlang-questions] Communicating Erlang and mozart

Kenneth Lundin kenneth.lundin@REDACTED
Wed Nov 12 08:57:06 CET 2008


Hi,

There is already a data serialization format for Erlang and there is
libraries for Java and C provided in the Open Source distribution
which support this
format.
The data format can be used on a plain socket back and forth between
Erlang and something external.
There is also support for so called C-nodes and Java-nodes which means
that a C-program or java program behaves as if it was a distributed
Erlang node connecting
to other nodes with the Erlang distribution protocol.

I suggest you either use the C library (called erl_interface) and
integrate it with Mozart
or you implement the data serialization and perhaps also the
distribution protocol
directly in Mozart.

You find the documentation of the distribution protocol and the data format
here http://www.erlang.org/doc/apps/erts/erl_ext_dist.html#8
and here http://www.erlang.org/doc/apps/erts/erl_dist_protocol.html#9

Regards Kenneth Erlang/OTP, Ericsson

On Wed, Nov 12, 2008 at 4:51 AM, Andrew Stone <stondage123@REDACTED> wrote:
> Enrique,
>
> A sample is not particularly easy to give, however what you are talking
> about is a data serialization (marshaling) issue. See http://www.webopedia.com/TERM/D/data_marshalling.html
>
> It is my opinion that
> using sockets for communication between different languages has a
> number of benefits and I wouldn't want to dissuade you from using them.
> In fact I have a significant chunk of code that passes data back and
> forth over TCP between Erlang and C++. It marshals the private data members of C++ classes which then get unmarshaled into the appropriate data structure on the Erlang side. We use cdr marshaling for this, however there is an infinite number of possibile marshaling formats. One of the simplest is Joe Armstrongs UBF(A) http://www.sics.se/~joe/ubf/site/home.html. You could also of course transform all the data into xml or json and then convert the structures based on the json/xml back into the native data structures of Erlang and XML.
>
> Good luck.
>
> -Andrew
>
>
>
> ----- Original Message ----
> From: Jose Enrique Benitez Jimenez <jebenitez@REDACTED>
> To: erlang-questions@REDACTED
> Sent: Sunday, November 9, 2008 12:50:25 PM
> Subject: [erlang-questions] Communicating Erlang and mozart
>
> Hello, I am developing a proyect  involving Mozart and Erlang and I need to communicate each other, I was thinking to use socket, but then I do not know how to structure the messages so that they understand each other, What if there is any standard, which serves to this case, and if you can give me a simple example, It would be very helpful, thank you very much.
>
> Enrique
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list