[zeromq-dev] Subports

Ciprian Dorin Craciun ciprian.craciun at gmail.com
Tue May 10 21:01:18 CEST 2011


On Tue, May 3, 2011 at 22:37, Pieter Hintjens <ph at imatix.com> wrote:
> On Tue, May 3, 2011 at 9:31 PM, Martin Pales <m.pales at gmail.com> wrote:
>
> [...] this proposal, which is more like
> HTTP virtual hosts than anything else.
>
> From TCP's point of view there's no difference. Client connects to
> server port. Thousands of clients can connect to server port. The
> special sauce is after connection, at 0MQ negotiation time, where the
> client says "I want service XYZ" and 0MQ is then able to forward that
> connection to a socket that bound on that port and using service
> "XYZ".
>
> -Pieter


    I've followed this thread, and I've seen nowhere mentioned the
socket identity. So if I understand correctly -- I'm a ZeroMQ newbie
so don't kill me :) -- for now we have the following socket
properties:
    * connect / accept address (i.e. "tcp://host:port", etc.) which
acts as transport end-point; there is a n-to-1 relation between
addresses and sockets;
    * socket identity, which acts as a logical endpoint, allowing for
example a "XREP" socket to select a particular logical destination,
and then a particular transport end-point for that destination; there
is a 1-to-1 relation between identity and socket;
    * socket type; 1-to-1 relation with socket;

    Now I've seen a new property introduced: "service", and from the
previous comments I can't figure it out what is the relation between
the "service" and the socket "identity". Possibilities:
    * one identity, with multiple services, each service with its
socket type; (a 1-to-n relation between identity and service);
    * multiple services, each service with its own identity and its
own socket type; (a 1-to-1 relation between identity and service);
    * any combination of an identity and service, each service with
its socket type; (a n-to-n relation between identity and service);

    I would propose the third solution, allowing thus multiple socket
identities on the same socket. My particular use-case -- somehow
simplified: a multi-agent platform which exposes a single ZeroMQ
socket over which it can interconnect multiple agents (i.e. multiple
identities per socket.)

    Ciprian.



More information about the zeromq-dev mailing list