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