GWT RPC with large data arrays

82 views
Skip to first unread message

Daniel Peterson

unread,
Jul 21, 2011, 1:08:29 PM7/21/11
to Google Web Toolkit
I'm trying to transmit large amounts of data from my server to my
client using the Asynchronous RPC calls. I've noticed that for these
arrays often take quite a long period of time to transmit. I'm only
sending four sets of data, but containing several hundred (to perhaps
a thousand) points each. I'm transmitting a simple class that holds
four parallel double arrays that will be used to populate a DataTable
for a visualization (from the Google Visualization API).

I could restructure my classes and doubtless get a little speed up (by
only having one array that I am transferring), but the entire
transmission process occurs three to four times faster if I parse the
data on the server from a byte array to a string using a string
buffer, than transmit a single string across the RPC.

I've seen that I could manually code the serialing interface for the
RPC call, but, unless I can find a way to send a large blob of data
and escape the arrays, I don't think that will speed up the process
too much.

I been looking into the JSON queries, but am not sure how much faster
they could be since it seems the point of that is to transmit a long
string across as well. As I understand it, the parsing would be faster
because JavaScript natively reads it.

Finally, I've glanced over HTTP requests, but I'm not sure about speed
gains there either, and I don't want to have to entirely retool my
server.

My question is thus: I'm fairly inexperienced at web development and
these sorts of client/server interactions. What would be the best way
to encode this data for quick transmission to the client?

Thanks.

Juan Pablo Gardella

unread,
Jul 21, 2011, 1:14:02 PM7/21/11
to google-we...@googlegroups.com
I think you can zip the data.

2011/7/21 Daniel Peterson <dannot...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Jeff Larsen

unread,
Jul 21, 2011, 1:21:55 PM7/21/11
to google-we...@googlegroups.com
I agree that gzipping the data probably makes sense


also I think that if you were to use JSON you'd see a marked improvement. You can test that theory out using RequestFactory, it uses JSON as the serialization technique. 
Reply all
Reply to author
Forward
0 new messages