[zeromq-dev] Designing ZWS
somdoron at gmail.com
Sat Aug 23 19:01:50 CEST 2014
For solution 2 zmsg_decode zmsg_encode can be used to serialize the message
(and would be part of the protocol).
On Sat, Aug 23, 2014 at 7:04 PM, Doron Somech <somdoron at gmail.com> wrote:
> 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...
More information about the zeromq-dev