--- projects/cms/documentation/specification/protocols.txt 2001/01/28 18:50:44 1.2 +++ projects/cms/documentation/specification/protocols.txt 2001/01/28 20:05:35 1.3 @@ -151,7 +151,12 @@ Host (direction) Server Comment server is either ok or that it thought there was an error +<<<<<<< protocols.txt +------------------------------------------------------------ + +======= +>>>>>>> 1.2 Host Heartbeat Protocol ----------------------- When a host is configured after it has connected it should @@ -230,6 +235,7 @@ Host (direction) Server Comment server is either ok or that it thought there was an error +------------------------------------------------------------ Host Data Protocol ------------------ @@ -243,12 +249,211 @@ n/xml_via_udp.txt Client Control Protocol ----------------------- - +The client control protocol channel is opened by the client +and allows a variety of actions to be carried out by the +client at anytime. Unlike previous protocols, this is NOT +sequential, all of the requests can be carried out in +any order. +All client protocols are backwards compatible, and the +version is shown by the protocol identifier. + +There are three sections to this protocol. + +1) Initialise (sent only at start) +2) Send command(s) - unlimited number in any order +3) Disconnect (sent only at end) + +If at anytime the client sends something the server does +not understand, an [ERROR] will be sent + +All are indicated with <> brackets. + +v1.0 - Protocol identifier: "PROTOCOL 1.0" (without quotes) + Supported commands: + STARTCONFIG + STARTDATA + STOPDATA + +Host (direction) Server Comment +------------------------------------------------------------ + +[CONNECT] ----------> Starts off the + client protocol + + <---------- [{protocol}] The server sends the + protocol identifier + +[{name}] ----------> The client sends its + "name". This name + is used to identify + the type of client + to the system and + obtain its config + eg, Conient + + <---------- [OK] Indicates the server + is ok to proceed + + + (allows client to obtain its configuration) +[STARTCONFIG]----------> Tell the server we + want to start this + command + + <---------- [OK] Indicates the server + is ok to proceed + + ********** LOOP START ********** + This loop reads configuration + properties from the config + +[{property}] ----------> Sends the name of a + property to be + retrieved from the + config file + Clients can obtain + host information + eg, + Host.UDPUpdateTime + Otherwise it must + prefix requests + with "Client." + All other requests + will be ignored as + if it was unable to + retieve the property + + <---------- [{value}|ERROR]Returns the value of + the requested config + property + eg, 120 + If it is unable to + find the requested + property it returns + ERROR to indicate + that fact + + ********** LOOP UNTIL ********** + The loop continues until the client + sends the following message + +[ENDCONFIG] ----------> Indicates that the + client requires no + more config + + ********** LOOP END ********** + Communication continues + + <---------- [OK] Indicates that the + server is ready to + proceed + + (tells the server to start the data link) +[STARTDATA] ----------> Tell the server we + want to start this + command + + <---------- [{portnumber} The server then sets + |ERROR] itself listening for + a connection on its + data link socket for + this client. It + returns the port no. + that it is listening + on eg, 12367 + If the data link is + yet to be started + the server will + return ERROR + + <---------- [OK] Indicates the server + is ok to proceed and + the client can + then connect its + data link + + (tells the server to stop the data link) +[STOPDATA] ----------> Tell the server we + want to start this + command + The server then + shuts down the + data link to the + client + + <---------- [OK|ERROR] Returns OK is the + server is ready to + proceed, or ERROR + if the data link + was not open in the + first place + + +[DISCONNECT] ----------> Tells the server the + client wants to + close the control + link + + <---------- [OK] The last word from + the server, it will + disappear after this +------------------------------------------------------------ + +v1.1 - Protocol identifier: "PROTOCOL 1.1" (without quotes) + Supported commands: + SETHOSTLIST + +Host (direction) Server Comment +------------------------------------------------------------ + (indicates to the server which hosts the client + wants data from) +[SETHOSTLIST]----------> Tell the server we + want to start this + command + + <---------- [OK|ERROR] The server will + return an ERROR if + the data link is + open, as a host list + must ONLY be set + if the data link is + closed + If the server is + ok to proceed with + the command it says + [OK] + +[{hostlist}] ----------> This is a semi-colon + seperated list of + FQDN hostnames that + the client wishes to + recieve data from + eg, + raptor.ukc.ac.uk;killigrew.ukc.ac.uk;chalk.ukc.ac.uk + + If the list is sent + blank (or if no list + is set at all) then + data from ALL hosts + will be sent to the + client + + <---------- [OK] Indicates the server + is ok to proceed and + the host list has + been accepted +------------------------------------------------------------ + Client Data Protocol -------------------- +Once the data link has been opened by the control link, the +server will send XML formated data packets seperated by the +\n (newline) character. For information on the format of +this data see the XML via UDP specification document at: - +http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specificatio +n/xml_via_udp.txt About -----