CID: When to (not) rely on them
Posted: 02 Jul 2011, 08:45
So ADC provides a means to uniquely identify a client across multiple hubs, using the concept of a CID. While it's conceptually very nice, from the perspective of a client it's hard to determine in which cases it is safe to rely on them, and in which cases it definitely isn't. In this topic I'm trying to clear up this confusion (for myself, mostly) and was wondering what you guys think of these things.
Connection Management
So far I have not seen a problem with using CIDs for C-C connection managent. This includes making sure there are not too many connections with the same client and stuff like slot granting. Slot granting can be implemented quite safely by just keeping the CID of the granted client and matching against the ID parameter sent in the connection.
Private Messaging
Now suppose a client has a global "Favourite users" list where each user is again identified with a CID. Suppose you want to initiate a PM chat with said user and find that he/she is online on multiple hubs. According to this recent interview, it's not safe to rely on the idea that both hubs will do just fine.
Conclusion: Need to use hub+CID as user identification here, to be safe.
Download Management
I am not yet aware of any client that implements per-hub shares, but have certainly seen it being mentioned a few times. In the case that a client does implement that, it would mean that CIDs alone can also not be used to identify which client has a particular file.
Conclusion: Again, need to use the hub+CID as client idenfitication in the queue/download code.
Any comments? Things I've missed so far?
Connection Management
So far I have not seen a problem with using CIDs for C-C connection managent. This includes making sure there are not too many connections with the same client and stuff like slot granting. Slot granting can be implemented quite safely by just keeping the CID of the granted client and matching against the ID parameter sent in the connection.
Private Messaging
Now suppose a client has a global "Favourite users" list where each user is again identified with a CID. Suppose you want to initiate a PM chat with said user and find that he/she is online on multiple hubs. According to this recent interview, it's not safe to rely on the idea that both hubs will do just fine.
Conclusion: Need to use hub+CID as user identification here, to be safe.
Download Management
I am not yet aware of any client that implements per-hub shares, but have certainly seen it being mentioned a few times. In the case that a client does implement that, it would mean that CIDs alone can also not be used to identify which client has a particular file.
Conclusion: Again, need to use the hub+CID as client idenfitication in the queue/download code.
Any comments? Things I've missed so far?