[zeromq-dev] Question about identities
Laurent Alebarde
l.alebarde at free.fr
Wed Dec 11 16:28:01 CET 2013
Thanks very much for your clear answer.
On my side, I have digged a little. The ROUTER initializes randomly a id
variable, then increments it each time a new peer connects. This ensures
that for 2^32 connections, the IDs are different. So, to answer my own
question, I1a != I1b.
Le 10/12/2013 15:55, AJ Lewis a écrit :
> Only ROUTERs care about identities.
>
> My understanding is that normally, a NULL ID is sent to the ROUTER at
> connection time, which then assigns an identity to that connection (I assume
> this is stored in a lookup table, where one column is the connection, and
> the other is the ID). If the DEALER has explicitly set an ID, then that is
> sent at connection time and the ROUTER stores it instead of a random one.
> The DEALER doesn't do anything else with the ID.
>
> The ROUTER then uses the lookup table when it gets messages with a routing
> envelope containing an ID to figure out which connection to route the
> message to.
>
> Please correct me if I'm wrong about this. :)
>
> AJ
>
> On Tue, Dec 10, 2013 at 11:38:33AM +0100, Laurent Alebarde wrote:
>> I did read ZMTP 3 RFC23 several times, but it is not so obvious, even with
>> the "Worked Example". In particular if two clients connect in the same time
>> to a ROUTER server. As the identity is communicated in the metadata at the
>> end of the handcheck, how the server distinguishes the two clients ? Is
>> there some temporary identities ? If yes, on what is it built ?
>>
>> Besides, setting an identity is an option. So a DEALER talking to a ROUTER
>> SHALL set an arbitrary one. But it knows it talks to a ROUTER after having
>> sent its identity. So it doesn't know it talks to a ROUTER when it sends its
>> identity, and therefore, it can send an empty one.
>>
>> I remain a bit confused.
>>
>>
>> Le 10/12/2013 10:17, Pieter Hintjens a écrit :
>>> Laurent, please read the ZMTP v3 protocol spec with regard to
>>> identities. A tells B, "this is my identity". B then uses that value
>>> to refer to A, IF AND ONLY IF B IS A ROUTER. More usually, A says "I
>>> have no identity" and B assigns an internal numeric identity.
>>>
>>> On Mon, Dec 9, 2013 at 3:59 PM, Laurent Alebarde <l.alebarde at free.fr> wrote:
>>>> Hi Devs,
>>>>
>>>> Are the identities of two different sockets on the same peer the same,
>>>> viewed by one single other peer ?
>>>>
>>>> Say:
>>>>
>>>> Node 1 ________________________________ Node 2
>>>> Socket A1 (NULL) <----------------------------------> Socket A2
>>>> (NULL) : Node 1 has identity I1a
>>>> Socket B1 (CURVE) <---------------------------------> Socket B2
>>>> (CURVE) : Node 1 has identity I1b
>>>>
>>>> Is I1a == I1b ?
>>>>
>>>> Cheers,
>>>>
>>>>
>>>> Laurent
>>>>
>>>> _______________________________________________
>>>> 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/20131211/876ec9c4/attachment.htm>
More information about the zeromq-dev
mailing list