-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Does ZK simply transfer data between the server and client over REST or is there a more efficient protocol?
Currently I have an application using Adobe Flex which is data intensive, large amounts of data are continually arriving asynchronously. Flex uses the AMF protocol, which is binary and orders of magnitude more efficient than using text/REST. Is there any such option with ZK? We're looking at ZK but I feel that it would be impossible to implement this particular application with a standard text/REST-based protocol.
John
ZK ajax requests are JSON.
A binary format would be more compact but I'm very skeptic about the actual difference in performance.
In the client side ZK needs a Javascript object tree anyway, so with a binary format you would have to implement deserialization logic. With JSON you can for example just eval() the data.
Therefore I'd guess that a binary format would have smaller requests, but larger client side processing times.
Thanks for the info.
"Therefore I'd guess that a binary format would have smaller requests, but larger client side processing times."
Agreed. In my case I think we would need to make that sacrifice (were it available). However perhaps using gzip compression on the server solves the problem? Since JSON is text it would compress very well.
But then, if you're gzipping it, you still need to consider the overhead of compression. Here's an article regarding g-zipping JSON (using Jackson-based json processing) stating that overhead is 3x-4x for reading, 4 - 6x for writing: http://www.cowtowncoder.com/blog/archives/2009/05/entry_263.html.
Asked: 2011-11-16 10:19:32 +0800
Seen: 283 times
Last updated: Nov 17 '11