Please allow me to second Matthew's point about code size. One of the
nicest things about using JSON is the fact that you can
implement it with essentially zero client code. That 10-20% number is
roughly in line with what I've seen in other projects that
use GWT-RPC for large data models, and I've always hated that fact.
I'd also like to see specific numbers on how fast parsing byte buffers
really is (relative to JSON parsing). My guess is that, even
on an engine like V8, it still sucks pretty hard, because Javascript's
semantics are not so good for dealing with byte arrays.
That said, I'd love to be proven wrong about that.
Finally, it raises the question of how you can move binary data over the
wire in the browser. If you want to move it over XHR,
or even WebSockets, you've still got to shove it into a string. And that
appears to require something like base-64 encoding,
because the browser will mangle some strings (we've found problems with
various unicode ranges getting mangled). Any
other ideas here?
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
The W3C is standardizing a "blob" interface that could be used for such
things:
http://www.w3.org/TR/FileAPI/#blob
http://www.w3.org/TR/XMLHttpRequest2/#the-send-method
http://www.w3.org/TR/XMLHttpRequest2/#the-responsebody-attribute
There's also Gears' Blob API which can be used with nowadays browsers, and
some
environments provide "blob" support too (e.g. Adobe AIR).
But I agree that binary support in browsers in not there yet.
This however doesn't account for some experimentations in current browsers,
such as
Firefox 3.x sendBinary()
https://developer.mozilla.org/en/XMLHttpRequest#sendAsBinary()