May 14, 2008
filed in the wee hours by DrScofield in: from the grid, void
technorati tags:
QR code for this entry · average time to read 1:04 minutes

we are currently looking at adding REST support to the RemoteAdmin plugin (other stuff to follow) --- the idea being that we can get information about (as well as change state of) a running OpenSim instance not only via XmlRpc but also via REST.

looking at the way we currently deal with serialization we either

  • use LLSD where mandated by secondlife (e.g., CAPS)
  • use .NET's System.Xml.XmlSerializer
  • use XmlRpc serialization (which goes back to System.Xml)

LLSD is being used by linden lab's and is proposed by LL/SLAWG as the serialization protocol of choice (IIUC). in my opinion it suffers from being a bit verbose and not really easy to parse.

XmlSerializer is "built in". on the other hand it's wordy and more complex to parse; also, it doesn't distinguish between the number 4711 and the string "4711" --- you have to know that a certain tag contains a string (or a number).

another alternative that has been suggested is JSON. JSON is lean, and easy to use from AJAX apps as well as python scripts (and the likes). it requires an additional DLL. it does however distinguish between strings and numbers. using a library like jsonexserializer --- BSD license --- makes it easy to use from C#.

personally, i've started to like JSON because it's lean and easy to use --- but i'd like to hear from you guys what you think about this. so, give it a vote!

which serialization format to use for OpenSim REST services?

  • JSON (78%, 18 Votes)
  • LLSD (13%, 3 Votes)
  • .NET native XmlSerialize (9%, 2 Votes)
  • ASN.1 (0%, 0 Votes)

Total Voters: 23

Loading ... Loading ...

all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.

3 comments »

  1. Hate to be the wet blanket, but Agile places the burden of ‘proof’ on JSON to show that adding yet another tech to the OpenSim code base is worth it, not matter how simple and cool it is.

    What is it going to be used for? Who’s the customer? People coding administrative front ends? Does this have any chance of growing into something more, like a way to query or add serialized assets?

    JSON seems obvious if this is just for administrative front end mashups. Maybe we limit the scope to that and make it JSON.

    LLSD would be my pick for asset serialization and such since it is more largely compatible with LL and the working group and includes three forms, xml, binary, and ‘human readable’, which I think is the one you are comparing JSON with.

    I suppose nothing wrong with having right tool for the job, and little mashes up better than JSON. But overall I prefer using what we have.

    comment by Mo Hax — May 14, 2008 @ 14:00

  2. I’ve sent my message to opensim-dev in support of JSON, for reasons which relate partially to “how expensive is it to transmit XML? how expensive is it to parse XML?” I also like your point that JSON distinguishes between 4711 and “4711″.

    Really, a representation language that can be described in 5 state diagrams is much better than the huge and overspecified cruft from the W3C. Regardless of the fact that there’s a documented interface to parse it, how many times have the XML parsers been found to have bugs?

    comment by Kyle H — May 14, 2008 @ 15:42

  3. I just ran into this post by chance……..

    LLSD wins hands down, why have more formats than needed?

    comment by Gareth Nelson — May 17, 2008 @ 21:15

RSS feed for comments on this post. TrackBack URI

Leave a comment