<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">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.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 5:56 PM, Motiejus Jakštys <span dir="ltr"><<a href="mailto:desired.mta@gmail.com" target="_blank">desired.mta@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Dec 15, 2013 at 10:39 PM, Serge Aleynikov <<a href="mailto:serge@aleynikov.org">serge@aleynikov.org</a>> wrote:<br>
> Since websockets nowadays support binary data, I implemented binary Erlang<br>
> External Term serialization, so that term_to_binary(Term) can be decoded<br>
> into Javascript objects and vice versa.<br>
><br>
> I'd like to share this example that illustrates the experiment:<br>
><br>
> <a href="https://github.com/saleyn/erws_example" target="_blank">https://github.com/saleyn/erws_example</a><br>
<br>
Are you going to use it practically? If yes, my rant below.<br>
<br>
<rant><br>
I remember Joe's opinion (from Stockholm EUC keynote last year?).<br>
Imprecise quote from memory: "if everyone could speak Swedish as well<br>
as native language, we all could talk to each other". No interpreters:<br>
just convert your native sentence to Swedish, speak out, the recipient<br>
converts Swedish to native, understands, replies ... all is good.<br>
<br>
The whole idea (and your project) pushes towards "Swedish=Erlang Term<br>
Format". This is all nice, but has a big IF: since this concerns<br>
communication between heterogenous computer systems, how are you going<br>
to convince enterprisey mainstream guys to talk to you via BERT? If<br>
all they know is XML (SOAP!), JSON (front-end) or HDF (CERN guys) or<br>
stuff like that.<br>
<br>
I believe in an approach piqi is trying to do: an interpreter which<br>
can speak much of the popular languages *and* your mother tongue. It's<br>
different, as it forces a schema (unlike BERT). However, for data<br>
exchange we need a schema anyway.<br>
<br>
Not meaning to offend/criticize. What you did is nice. Your project<br>
just reminded me an unanswered question.<br>
</rant><br>
<span class="HOEnZb"><font color="#888888"><br>
Motiejus<br>
</font></span></blockquote></div><br></div>