[erlang-questions] Binary Erlang External Term serialization in Javascript

Serge Aleynikov serge@REDACTED
Mon Dec 16 01:25:44 CET 2013

Fortunately (oh no! :-O) not everyone is concerned about talking to
mainstream enterprise. If you have a server component implemented in
Erlang, why incur the trouble of dealing with a text-based protocol (JSON,
XML, etc), if the other end can happily deal with native Erlang binary
(de)serialization?  Ssince this method has lower overhead than JSON, and
seems to bring Javascript a step closer to Erlang, I can think of many
cases where I'd use this approach for writing Web GUIs using websockets
which need asynchronous messaging, and need to display very dynamic data
initiated by server.

On Sun, Dec 15, 2013 at 5:56 PM, Motiejus Jakštys <desired.mta@REDACTED>wrote:

> On Sun, Dec 15, 2013 at 10:39 PM, Serge Aleynikov <serge@REDACTED>
> wrote:
> > Since websockets nowadays support binary data, I implemented binary
> Erlang
> > External Term serialization, so that term_to_binary(Term) can be decoded
> > into Javascript objects and vice versa.
> >
> > I'd like to share this example that illustrates the experiment:
> >
> > https://github.com/saleyn/erws_example
> Are you going to use it practically? If yes, my rant below.
> <rant>
> I remember Joe's opinion (from Stockholm EUC keynote last year?).
> Imprecise quote from memory: "if everyone could speak Swedish as well
> as native language, we all could talk to each other". No interpreters:
> just convert your native sentence to Swedish, speak out, the recipient
> converts Swedish to native, understands, replies ... all is good.
> The whole idea (and your project) pushes towards "Swedish=Erlang Term
> Format". This is all nice, but has a big IF: since this concerns
> communication between heterogenous computer systems, how are you going
> to convince enterprisey mainstream guys to talk to you via BERT? If
> all they know is XML (SOAP!), JSON (front-end) or HDF (CERN guys) or
> stuff like that.
> I believe in an approach piqi is trying to do: an interpreter which
> can speak much of the popular languages *and* your mother tongue. It's
> different, as it forces a schema (unlike BERT). However, for data
> exchange we need a schema anyway.
> Not meaning to offend/criticize. What you did is nice. Your project
> just reminded me an unanswered question.
> </rant>
> Motiejus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131215/2b06c16f/attachment.htm>

More information about the erlang-questions mailing list