[zeromq-dev] ZeroMQ ZMTP using WebSocket's own framing?

Pieter Hintjens ph at imatix.com
Fri Jun 7 15:20:52 CEST 2013


Hi Yannick,

It's an interesting question and may be possible. I'm a little
sceptical since HTTP doesn't offer any routing, so while you might be
able to exchange frames it's unclear you could map the socket
semantics themselves.

I'd start by making or using a bridge, i.e. an app that speaks 0MQ
tcp:// at one side and ws:// at the other side, and learn from this
how to map the socket patterns themselves.

Then it becomes reasonable to ask "how can we do this inside libzmq?"

-Pieter

On Fri, Jun 7, 2013 at 2:38 PM, Yannick Koehler <yannick at koehler.name> wrote:
> Hi,
>
>   I am new to ZeroMQ, I am evaluating this technology for a business
> project.  We found this technology interesting and also found websocket to
> meet our need.  WebSocket already provide a framing protocol and manage a
> TCP connection, yet doesn't offer a API related to messaging at the same
> level than ZeroMQ.
>
>   It is also my understanding that ZeroMQ performance and low latency are
> mostly achieve due to its own management of the TCP connection via batching.
>
>   I have found solution that proxy ZeroMQ to WebSocket, but, my
> understanding is that doing so will negatively impact the performance of
> pure ZeroMQ over a TCP socket directly since then the WebSocket itself may
> not use the same batching mechnism and end up slowing things down.
>
>   I was wondering is there was work to have a ZeroMQ definition that would
> re-use the websocket framing definition so that one could just use "ws://*"
> as a endpoint description to means setup a websocket is none exists for this
> endpoint (or re-use one) and do what zeroMQ does using the same framing as
> websocket (not an extra framing definition over the existing one) and then
> get the same benefit as ZeroMQ using technology that would allow sharing a
> single port (80/443) for ZeroMQ or HTTP activity.
>
>   I would be interested in such work, and if this is not something that has
> been started, I would really like to get your opinion on how this could be
> reach so that I can attempt to code it.
>
> --
> Yannick Koehler
>
>
> _______________________________________________
> 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