Re: Issue 1 in gwt-rpc-plus: Use binary rather than JSON for Firefox and Safari

2 views
Skip to first unread message

gwt-rp...@googlecode.com

unread,
Nov 27, 2009, 5:36:11 PM11/27/09
to dotspots-o...@googlegroups.com

Comment #2 on issue 1 by j...@google.com: Use binary rather than JSON for
Firefox and Safari
http://code.google.com/p/gwt-rpc-plus/issues/detail?id=1

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

gwt-rp...@googlecode.com

unread,
Mar 25, 2010, 8:33:21 PM3/25/10
to dotspots-o...@googlegroups.com

Comment #3 on issue 1 by t.broyer: Use binary rather than JSON for Firefox
and Safari
http://code.google.com/p/gwt-rpc-plus/issues/detail?id=1

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()

Reply all
Reply to author
Forward
0 new messages