[zeromq-dev] Designing ZWS

Michael Haberler mail17 at mah.priv.at
Sun Aug 24 10:57:32 CEST 2014


Am 23.08.2014 um 21:04 schrieb Pieter Hintjens <ph at imatix.com>:

> Simpler is always better, if it works. You can always improve for
> performance later.

yes, but unfortunately the framing decision impacts client code as we move along

Doron: are you suggesting #3 encompasses multiple frames but not necessarily a complete multipart message? 

if not, my vote would go for #3 - reduce number of interactions as far as possible to get per-transaction overhead/turnaround time down

if yes - #4; I dont see the upside of eagerly sending incomplete multipart messages; also simpler on the framing protocol

- Michael

> 
> On Sat, Aug 23, 2014 at 6:04 PM, Doron Somech <somdoron at gmail.com> wrote:
>> Hi,
>> 
>> 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.
>> 
>> Thanks,
>> 
>> Doron
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list