[erlang-questions] UBF

Erik Reitsma <>
Fri Jan 16 11:07:07 CET 2009


| We're on our way to using UBF for specifying a JSON-RPC-based 
| protocol to a third-party developer.  There is no really 
| sweet mapping between Erlang terms and JSON objects, so we've 
| picked something that looks merely sort-of ugly.  Using 
| L-Shift's JSON library, we are plowing ahead.

Oh yes, I had almost forgotten: I have written an
UBF-to-JSON(AJAJ)-gateway, so that I can implement an UBF client in
Javascript in a browser. Handling binaries is a bit tricky. For my
problem I have chosen to send an URL in the JSON, from which the
Javascript application can fetch the binary. Usually this binary is an
image.
I use this gateway for an application for which we had a J2ME client,
and the customer wanted a web client too. Using this gateway we did not
have to change the server at all. The server was written in Java, so it
was easier to write a generic UBF-to-JSON gateway in Erlang than to add
JSON support to the Java server. And now we have a gateway which we can
reuse for similar situations. :-)

*Erik.



More information about the erlang-questions mailing list