151 |
|
server is either ok |
152 |
|
or that it thought |
153 |
|
there was an error |
154 |
+ |
<<<<<<< protocols.txt |
155 |
+ |
------------------------------------------------------------ |
156 |
+ |
|
157 |
+ |
======= |
158 |
|
|
159 |
+ |
>>>>>>> 1.2 |
160 |
|
Host Heartbeat Protocol |
161 |
|
----------------------- |
162 |
|
When a host is configured after it has connected it should |
235 |
|
server is either ok |
236 |
|
or that it thought |
237 |
|
there was an error |
238 |
+ |
------------------------------------------------------------ |
239 |
|
|
240 |
|
Host Data Protocol |
241 |
|
------------------ |
243 |
|
simply XML data. For information on the format of this |
244 |
|
data see the XML via UDP specification document at: |
245 |
|
|
246 |
< |
http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specificatio |
241 |
< |
n/xml_via_udp.txt |
246 |
> |
http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specification/xml_via_udp.txt |
247 |
|
|
248 |
|
Client Control Protocol |
249 |
|
----------------------- |
250 |
|
|
251 |
< |
<TODO> |
251 |
> |
The client control protocol channel is opened by the client |
252 |
> |
and allows a variety of actions to be carried out by the |
253 |
> |
client at anytime. Unlike previous protocols, this is NOT |
254 |
> |
sequential, all of the requests can be carried out in |
255 |
> |
any order. |
256 |
|
|
257 |
+ |
All client protocols are backwards compatible, and the |
258 |
+ |
version is shown by the protocol identifier. |
259 |
+ |
|
260 |
+ |
There are three sections to this protocol. |
261 |
+ |
|
262 |
+ |
1) Initialise (sent only at start) |
263 |
+ |
2) Send command(s) - unlimited number in any order |
264 |
+ |
3) Disconnect (sent only at end) |
265 |
+ |
|
266 |
+ |
If at anytime the client sends something the server does |
267 |
+ |
not understand, an [ERROR] will be sent |
268 |
+ |
|
269 |
+ |
All are indicated with <> brackets. |
270 |
+ |
|
271 |
+ |
v1.0 - Protocol identifier: "PROTOCOL 1.0" (without quotes) |
272 |
+ |
Supported commands: |
273 |
+ |
STARTCONFIG |
274 |
+ |
STARTDATA |
275 |
+ |
STOPDATA |
276 |
+ |
|
277 |
+ |
Host (direction) Server Comment |
278 |
+ |
------------------------------------------------------------ |
279 |
+ |
<initialise> |
280 |
+ |
[CONNECT] ----------> Starts off the |
281 |
+ |
client protocol |
282 |
+ |
|
283 |
+ |
<---------- [{protocol}] The server sends the |
284 |
+ |
protocol identifier |
285 |
+ |
|
286 |
+ |
[{name}] ----------> The client sends its |
287 |
+ |
"name". This name |
288 |
+ |
is used to identify |
289 |
+ |
the type of client |
290 |
+ |
to the system and |
291 |
+ |
obtain its config |
292 |
+ |
eg, Conient |
293 |
+ |
|
294 |
+ |
<---------- [OK] Indicates the server |
295 |
+ |
is ok to proceed |
296 |
+ |
|
297 |
+ |
|
298 |
+ |
<command #1> (allows client to obtain its configuration) |
299 |
+ |
[STARTCONFIG]----------> Tell the server we |
300 |
+ |
want to start this |
301 |
+ |
command |
302 |
+ |
|
303 |
+ |
<---------- [OK] Indicates the server |
304 |
+ |
is ok to proceed |
305 |
+ |
|
306 |
+ |
********** LOOP START ********** |
307 |
+ |
This loop reads configuration |
308 |
+ |
properties from the config |
309 |
+ |
|
310 |
+ |
[{property}] ----------> Sends the name of a |
311 |
+ |
property to be |
312 |
+ |
retrieved from the |
313 |
+ |
config file |
314 |
+ |
Clients can obtain |
315 |
+ |
host information |
316 |
+ |
eg, |
317 |
+ |
Host.UDPUpdateTime |
318 |
+ |
Otherwise it must |
319 |
+ |
prefix requests |
320 |
+ |
with "Client." |
321 |
+ |
All other requests |
322 |
+ |
will be ignored as |
323 |
+ |
if it was unable to |
324 |
+ |
retieve the property |
325 |
+ |
|
326 |
+ |
<---------- [{value}|ERROR]Returns the value of |
327 |
+ |
the requested config |
328 |
+ |
property |
329 |
+ |
eg, 120 |
330 |
+ |
If it is unable to |
331 |
+ |
find the requested |
332 |
+ |
property it returns |
333 |
+ |
ERROR to indicate |
334 |
+ |
that fact |
335 |
+ |
|
336 |
+ |
********** LOOP UNTIL ********** |
337 |
+ |
The loop continues until the client |
338 |
+ |
sends the following message |
339 |
+ |
|
340 |
+ |
[ENDCONFIG] ----------> Indicates that the |
341 |
+ |
client requires no |
342 |
+ |
more config |
343 |
+ |
|
344 |
+ |
********** LOOP END ********** |
345 |
+ |
Communication continues |
346 |
+ |
|
347 |
+ |
<---------- [OK] Indicates that the |
348 |
+ |
server is ready to |
349 |
+ |
proceed |
350 |
+ |
|
351 |
+ |
<command #2> (tells the server to start the data link) |
352 |
+ |
[STARTDATA] ----------> Tell the server we |
353 |
+ |
want to start this |
354 |
+ |
command |
355 |
+ |
|
356 |
+ |
<---------- [{portnumber} The server then sets |
357 |
+ |
|ERROR] itself listening for |
358 |
+ |
a connection on its |
359 |
+ |
data link socket for |
360 |
+ |
this client. It |
361 |
+ |
returns the port no. |
362 |
+ |
that it is listening |
363 |
+ |
on eg, 12367 |
364 |
+ |
If the data link is |
365 |
+ |
yet to be started |
366 |
+ |
the server will |
367 |
+ |
return ERROR |
368 |
+ |
|
369 |
+ |
<---------- [OK] Indicates the server |
370 |
+ |
is ok to proceed and |
371 |
+ |
the client can |
372 |
+ |
then connect its |
373 |
+ |
data link |
374 |
+ |
|
375 |
+ |
<command #3> (tells the server to stop the data link) |
376 |
+ |
[STOPDATA] ----------> Tell the server we |
377 |
+ |
want to start this |
378 |
+ |
command |
379 |
+ |
The server then |
380 |
+ |
shuts down the |
381 |
+ |
data link to the |
382 |
+ |
client |
383 |
+ |
|
384 |
+ |
<---------- [OK|ERROR] Returns OK is the |
385 |
+ |
server is ready to |
386 |
+ |
proceed, or ERROR |
387 |
+ |
if the data link |
388 |
+ |
was not open in the |
389 |
+ |
first place |
390 |
+ |
|
391 |
+ |
<disconnect> |
392 |
+ |
[DISCONNECT] ----------> Tells the server the |
393 |
+ |
client wants to |
394 |
+ |
close the control |
395 |
+ |
link |
396 |
+ |
|
397 |
+ |
<---------- [OK] The last word from |
398 |
+ |
the server, it will |
399 |
+ |
disappear after this |
400 |
+ |
------------------------------------------------------------ |
401 |
+ |
|
402 |
+ |
v1.1 - Protocol identifier: "PROTOCOL 1.1" (without quotes) |
403 |
+ |
Supported commands: |
404 |
+ |
SETHOSTLIST |
405 |
+ |
|
406 |
+ |
Host (direction) Server Comment |
407 |
+ |
------------------------------------------------------------ |
408 |
+ |
<command #4> (indicates to the server which hosts the client |
409 |
+ |
wants data from) |
410 |
+ |
[SETHOSTLIST]----------> Tell the server we |
411 |
+ |
want to start this |
412 |
+ |
command |
413 |
+ |
|
414 |
+ |
<---------- [OK|ERROR] The server will |
415 |
+ |
return an ERROR if |
416 |
+ |
the data link is |
417 |
+ |
open, as a host list |
418 |
+ |
must ONLY be set |
419 |
+ |
if the data link is |
420 |
+ |
closed |
421 |
+ |
If the server is |
422 |
+ |
ok to proceed with |
423 |
+ |
the command it says |
424 |
+ |
[OK] |
425 |
+ |
|
426 |
+ |
[{hostlist}] ----------> This is a semi-colon |
427 |
+ |
seperated list of |
428 |
+ |
FQDN hostnames that |
429 |
+ |
the client wishes to |
430 |
+ |
recieve data from |
431 |
+ |
eg, |
432 |
+ |
raptor.ukc.ac.uk;killigrew.ukc.ac.uk;chalk.ukc.ac.uk |
433 |
+ |
|
434 |
+ |
If the list is sent |
435 |
+ |
blank (or if no list |
436 |
+ |
is set at all) then |
437 |
+ |
data from ALL hosts |
438 |
+ |
will be sent to the |
439 |
+ |
client |
440 |
+ |
|
441 |
+ |
<---------- [OK] Indicates the server |
442 |
+ |
is ok to proceed and |
443 |
+ |
the host list has |
444 |
+ |
been accepted |
445 |
+ |
------------------------------------------------------------ |
446 |
+ |
|
447 |
|
Client Data Protocol |
448 |
|
-------------------- |
449 |
+ |
Once the data link has been opened by the control link, the |
450 |
+ |
server will send XML formated data packets seperated by the |
451 |
+ |
\n (newline) character. For information on the format of |
452 |
+ |
this data see the XML via UDP specification document at: |
453 |
|
|
454 |
< |
<TODO> |
454 |
> |
http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specification/xml_via_udp.txt |
455 |
|
|
456 |
|
About |
457 |
|
----- |