Post
by fluke » 2006-12-06 15:45
From how I read the ADC protocol, it sounds like the hub has the option to speak first. There is nothing in the description that prohibits the hub from sending a SUP or STA immediately on connect. It is clear from the description that after the client sends it's SUP that the hub should respond with it's own SUP (even if it already provided it before). For a ADC protocol banner similar to SMTP, FTP and so on, I would recommend issuing a "ISTA 010" followed by the greeting string. But a client must still assume that an ADC hub will reserve responding until it gets a HSUP from the client.
Btw, ADC protocol draft 0.12 contains a badly worded line of:
"When the server receives this message the first time, it should reply in kind, assign an SID to the client, send an INF about itself and move to the IDENTIFY state."
It should say:
When the server receives this message the first time, it should reply in kind, assign an SID to the client, move to the IDENTIFY state and send an INF about itself.
As it is worded now, it sounds like the client should be able to always expect an IINF after an ISID (and that INF is being sent as part of the PROTOCOL state). As part of being moved into the identify state, it becomes valid for the hub to send a IQUI right after the ISID instead of a IINF.
The issue that bothers me the most about the handshake in ADC protocol draft 0.12 is that there is always the overhead of assigning a sid before being able to send a URL redirect. It would be nice if the protocol description allowed for use of the QUI flag of RD when using the STA command. For example, when the hub is full I would like to be able to immediately send to any further connection attempts the following:
ISTA 211 Hub is full, redirecting to less busy sister hub RD=adc://sisterhub
I can think of cases where use of the RD flag would be nice for any STA codes of 21x (generic hub error), 22x (login/access error) or 23x (kick/ban/disconnects).
In terms of auto-detection of hub type, it should not matter if ADC provides a banner or requires the client to send first. Instead, the ADC protocol should make it a requirement that the hub never silently close/time-out a connection. Rather, issuing a STA or QUI should be mandatory. Hence, if a client waiting for a $Lock gets time-out with an STA, it should automatically mark the profile as being an ADC client and reconnect. It should be fairly rare that someone would downgrade an ADC hub back to a DC hub. So, once autodetection of an ADC hub via time-out is discovered then no further autodetection should be needed.