On Fri, Feb 26, 2010 at 4:49 AM, Earlence Fernandes <[email protected]> wrote: > Hi Peter/Fabio, > > Thanks for those pointers. > However, my idea is to use JSON as the data transfer medium while on the > mobile network. > Right now the idea is just in the initial stages, however, here is how it > can work: > > the mobile based client initiates a connected to the server via a <Stream> > element, with an ENHANCEMENT, > namely an attribute specifying that it is a mobile client. > The server notes this. Also, on the server is an XML-to-JSON gate module. > After the server notes this, all subsequent communications FROM the server > in encoded in JSON. > The device also switches over to the use of JSON for all communication. > > The reason for this idea is according to studies on JSON performance, for > all practicable purposes, > it is close to binary encodings of similar nature > (http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking) > > As you have correctly mentioned, we need more implementations, but this is > quite a radical approach > and I feel intent on pursuing it with the help of others if it is a good > idea.
I see, nothing to do with the other optimizations. XML-to-JSON is anything but simple, since JSON lacks namespaces and for an extensible protocol like XMPP this is a big obstacle. Moreover if you introduce namespaces I'm not sure that JSON will continue outperforming XML text serialization. Since the main step is finding a workable mapping, I think that you could try discussing the subject on the BOSH mailing list, where several people have already discussed about this type of mapping. -- Fabio Forno, Bluendo srl http://www.bluendo.com jabber id: [email protected]
