[zeromq-dev] Designing ZWS

Doron Somech somdoron at gmail.com
Sat Aug 23 18:04:43 CEST 2014


I'm having some thoughts regarding the designing of ZWS protocol (zeromq
over websocket), mainly regarding the mapping of zeromq messages and frames
over websocket messages and I'm not sure which solution is the right one,
so I would like to brainstorm a little.

Solution 1 (current solution): Each ZeroMQ frame maps to one websocket
message. The problem with the solution is a lot of memory allocation and
copying. Also code is a little complicated because frames has to be
accumulated until the last frame before can be forward.

Solution 2: Each zeromq message map to one websocket message. Simple and
easy to implement. I like it more than the current solution because the
implementation is cleaner.

Solution 3: Multiple frames batched into one websocket message.
Implementation is little complicated. Similar to ZMTP.

Solution 4: Multiple messages batched into one websocket message. Like
previous solutions except it guaranteed the messages are complete. Little
easier to implement than previous solution, cleaner code.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140823/0c50ec34/attachment.html>

More information about the zeromq-dev mailing list