[zeromq-dev] Designing ZWS

Doron Somech somdoron at gmail.com
Sun Aug 24 11:12:04 CEST 2014


Michael I don't think it would impact any of the API, neither ZWSSock or
JSMQ.

I think it down to number 4 vs number 2, bottom line complete message, the
question if multiple or single, I think we should start with single
(solution 2) because it is much easier to implement. Later we can do the
batching if needed. (ZWSSock already enjoy the batching feature of ZeroMQ
and I believe the browser also implement some kind of batching).

Doron



On Sun, Aug 24, 2014 at 11:57 AM, Michael Haberler <mail17 at mah.priv.at>
wrote:

>
> 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
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140824/7a227c9c/attachment.html>


More information about the zeromq-dev mailing list