0

Efficient data transfer protocol

asked 2011-11-16 10:19:32 +0800

fletchmlt gravatar image fletchmlt
15

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

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2011-11-16 12:25:38 +0800

gekkio gravatar image gekkio flag of Finland
899 1
http://gekkio.fi/blog

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.

link publish delete flag offensive edit

answered 2011-11-16 14:11:26 +0800

fletchmlt gravatar image fletchmlt
15

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.

link publish delete flag offensive edit

answered 2011-11-17 00:35:11 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Yes. The JSON stream can be gzipped before send onto network and the compression rate is good.

link publish delete flag offensive edit

answered 2011-11-17 02:31:23 +0800

RichardL gravatar image RichardL
768 4

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.

link publish delete flag offensive edit

answered 2011-11-17 09:14:32 +0800

fletchmlt gravatar image fletchmlt
15

Thanks for the link, it's interesting.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-11-16 10:19:32 +0800

Seen: 283 times

Last updated: Nov 17 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More