[Opensim-dev] what to use for serializing structures? LLSD? XmlSerializer? JSON?

Stefan Andersson stefan at tribalmedia.se
Tue May 13 18:28:18 UTC 2008


* LLSD is just awful - a hodgepodge compromise between doing the old thing and doing the right thing. Let's _please_ stay well clear of that.
* JSON is really really cool for browser-oriented apps, but is there a schema for it?
* XML is XML. Industry standard, well proven, and actually has stuff like XML Schema, which is what you'd use to add type information to data; schema or not, the serializer infers type from the serialized class.
We at Tribal are using a Serialized Command Object approach, where we POST XmlSerialized "Command Objects", which can reference any other serializable type. Kind of an Ultralight Web Service. Easy as pie to produce output, and a pice of cake to parse it. Not any more wordy than what's needed to have human-readable datagrams with extensible semantics.
 
Works like a charm.
 
I believe this approach is part of what MW talked about in his posts on services from a while back.
 
/Stefan



> Date: Tue, 13 May 2008 19:25:55 +0200> From: DrScofield at xyzzyxyzzy.net> To: opensim-dev at lists.berlios.de> Subject: [Opensim-dev] what to use for serializing structures? LLSD? XmlSerializer? JSON?> > hi,> > 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 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).> > 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 (http://code.google.com/p/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.> > cheers,> dr scofield> > -- > dr dirk husemann, mathmatics and computer science, ibm zurich research lab> SL: dr scofield ---- drscofield at xyzzyxyzzy.net ---- http://xyzzyxyzzy.net/> RL: hud at zurich.ibm.com - +41 44 724 8573 - http://www.zurich.ibm.com/~hud/> > _______________________________________________> Opensim-dev mailing list> Opensim-dev at lists.berlios.de> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080513/66288539/attachment-0001.html>


More information about the Opensim-dev mailing list