[zeromq-dev] Sniffing connections
Michael
mwpowellhtx at gmail.com
Sat Apr 13 22:28:23 CEST 2013
From: zeromq-dev-bounces at lists.zeromq.org
[mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Pieter Hintjens
Sent: Friday, April 12, 2013 4:15 AM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] Sniffing connections
On Fri, Apr 12, 2013 at 6:21 AM, asif saeed <asif.lse2 at gmail.com> wrote:
I don't understand. TCP is already implemented in 0MQ, why is this protocol
needed in the first place? Could you please give me a tutorial, etc?
Good question. I'll add some explanation in the RFC. Here is the story:
TCP carries a stream of bytes with no structure and no meaning. At the least
we need to encode messages, with size and body. This was the original 0MQ
TCP protocol: just frames with no other meaning. Then we added a flags byte
so we could do multipart frames. Then we sent the identity as the first
frame. Now we found it was impossible for older versions of the library to
talk to newer ones, so we added a version number. We wanted to allow peers
to check socket types, so we added the socket type to the greeting. Then we
wanted to add security so we added a security handshake...
So it goes. Without a formal protocol, you can certainly send and receive
messages but you cannot promise much more.
Perhaps the confusion is over the guaranteed nature of TCP delivery. As
contrasted with say UDP/IP (data gram) which does not.
http://en.wikipedia.org/wiki/Transmission_Control_Protocol
http://en.wikipedia.org/wiki/User_Datagram_Protocol
Pieter is exactly right: reliability of the underlying transport is one
thing. Sending and receiving messages that actually mean something within a
system is quite another animal. Not limited to TCP/IP or UDP/IP either: goes
well back to bus, over the wire serial communications, etc.
-Pieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130413/959a3205/attachment.htm>
More information about the zeromq-dev
mailing list