I guess you all know about Chinese whispers. <div><br></div><div>You send a whispered message round a circle and see if you get the same</div><div>message back.</div><div><br></div><div>The computer variant is as follows:</div>
<div><br></div><div>Send a complex data structure round a circle, and see if you get the same message back.</div><div><br></div><div>The circle is a ring of processes written in *different* programming languages.</div><div>
The message is a complex message, containing primitives such as integers, booleans</div><div>and strings and constructed types "sequence of" "tuple of" etc.</div><div><br></div><div>Messages are sent over sockets. I want each language to unpack the message into the</div>
<div>internal form that is appropriate for that form, and then reconstruct the message from the internal form.</div><div><br></div><div>This is something that I think *should be very easy* but is in fact very difficult.</div>
<div><br></div><div>In a previous post I outlined how Erlang could talk to javascript but this method is not simple</div><div>and not compete - it would break done, for example if the integers were bignums.</div><div><br>
</div><div>What should we use for the internal form? JSON is untyped so will give us lots of problems.</div><div>ASN.1 is great but badly supported in many PLs - xml? - but the schemas are horrible.</div><div>Thrift? - Google protocol buffers ... some kind of self-describing binary format would seem</div>
<div>appropriate - bert for example.</div><div><br></div><div>I really would be nice to solve this problem is the simplest possible way so that it</div><div>was very easy to send whispers round a circle and get back what you sent.</div>
<div><br></div><div>/Joe</div><div><br></div><div><br></div><div><br></div><div><br></div>