12 |
|
- Client Control Protocol |
13 |
|
- Client Data Protocol |
14 |
|
|
15 |
– |
|
15 |
|
Conventions |
16 |
|
----------- |
17 |
|
All protocols in this document assume a valid connection of |
25 |
|
character. For example: |
26 |
|
|
27 |
|
[OK|ERROR] |
28 |
< |
|
28 |
> |
|
29 |
|
Indicates that the message "OK" OR the message "ERROR" will |
30 |
|
be sent depending on the result of the last action. |
31 |
|
|
35 |
|
|
36 |
|
{lastmodified} |
37 |
|
|
38 |
< |
Indicates that data for use as 'last modified' will be |
39 |
< |
returned. |
38 |
> |
Indicates that data for use as 'last modified' will be |
39 |
> |
returned. |
40 |
|
|
41 |
< |
If [ERROR] is sent back at any time, this indicates that all |
41 |
> |
If [ERROR] is sent back at any time, this indicates that all |
42 |
|
communication is over. EXCEPT where otherwise specified! |
43 |
|
|
45 |
– |
|
44 |
|
Host Connection Protocol |
45 |
|
------------------------ |
46 |
|
The initial connection of a host to the i-scream server is |
56 |
|
[STARTCONFIG]----------> Requests to start |
57 |
|
receiving config |
58 |
|
information |
59 |
< |
|
59 |
> |
|
60 |
|
<---------- [OK|ERROR] If the server ok's |
61 |
|
the request or not |
62 |
|
|
65 |
|
(used when checking |
66 |
|
if the config has |
67 |
|
changed) |
68 |
< |
|
68 |
> |
|
69 |
|
<---------- [{lastmodified}Returns a long int |
70 |
|
|ERROR] time since epoch |
71 |
|
eg, 123456789 |
76 |
|
"measured in milli |
77 |
|
-seconds since the |
78 |
|
epoch" |
79 |
< |
|
79 |
> |
|
80 |
|
[FILELIST] ----------> Asks the server for |
81 |
|
the list of files |
82 |
|
that were used to |
84 |
|
(used when checking |
85 |
|
if the config has |
86 |
|
changed) |
87 |
< |
|
87 |
> |
|
88 |
|
<---------- [{filelist} Returns a semi-colon |
89 |
|
|ERROR] separated list of |
90 |
|
filenames |
100 |
|
retrieved from the |
101 |
|
config file |
102 |
|
eg, UDPUpdateTime |
103 |
< |
|
103 |
> |
|
104 |
|
<---------- [{value}|ERROR]Returns the value of |
105 |
|
the requested config |
106 |
|
property |
109 |
|
find the requested |
110 |
|
property it returns |
111 |
|
ERROR to indicate |
112 |
< |
that fact, but |
113 |
< |
communication still |
112 |
> |
that fact, but |
113 |
> |
communication still |
114 |
|
proceeds |
115 |
< |
|
115 |
> |
|
116 |
|
********** LOOP UNTIL ********** |
117 |
|
The loop continues until the host |
118 |
|
sends the following message |
119 |
< |
|
119 |
> |
|
120 |
|
[ENDCONFIG] ----------> Indicates that the |
121 |
|
host requires no |
122 |
|
more config |
123 |
< |
|
123 |
> |
|
124 |
|
********** LOOP END ********** |
125 |
|
Communication continues |
126 |
< |
|
126 |
> |
|
127 |
|
<---------- [OK] Indicates that the |
128 |
|
server is ready to |
129 |
|
proceed |
130 |
< |
|
130 |
> |
|
131 |
|
[FILTER] ----------> Asks the server to |
132 |
|
send it the host |
133 |
|
information of a |
134 |
|
filter that it |
135 |
|
should connect to |
136 |
< |
|
136 |
> |
|
137 |
|
<---------- {filter} Returns a semi-colon |
138 |
|
separated list of |
139 |
|
FQDN hostname, UDP |
151 |
|
server that the host |
152 |
|
has finished an will |
153 |
|
disconnect |
154 |
< |
|
154 |
> |
|
155 |
|
<---------- [OK|ERROR] Indicates that the |
156 |
|
server is either ok |
157 |
|
or that it thought |
158 |
|
there was an error |
159 |
|
------------------------------------------------------------ |
160 |
< |
|
160 |
> |
|
161 |
|
Host Heartbeat Protocol |
162 |
|
----------------------- |
163 |
|
When a host is configured after it has connected it should |
175 |
|
[HEARTBEAT] ----------> Starts the |
176 |
|
heartbeat protocol |
177 |
|
off |
178 |
< |
|
178 |
> |
|
179 |
|
<---------- [OK|ERROR] Indicates that the |
180 |
|
server is ok or not |
181 |
|
|
238 |
|
server that the host |
239 |
|
has finished an will |
240 |
|
disconnect |
241 |
< |
|
241 |
> |
|
242 |
|
<---------- [OK|ERROR] Indicates that the |
243 |
|
server is either ok |
244 |
|
or that it thought |
259 |
|
The client control protocol channel is opened by the client |
260 |
|
and allows a variety of actions to be carried out by the |
261 |
|
client at anytime. Unlike previous protocols, this is NOT |
262 |
< |
sequential, all of the requests can be carried out in |
262 |
> |
sequential, all of the requests can be carried out in |
263 |
|
any order. |
264 |
|
|
265 |
|
All client protocols are backwards compatible, and the |
285 |
|
Host (direction) Server Comment |
286 |
|
------------------------------------------------------------ |
287 |
|
<initialise> |
288 |
< |
[CONNECT] ----------> Starts off the |
288 |
> |
[CONNECT] ----------> Starts off the |
289 |
|
client protocol |
290 |
< |
|
290 |
> |
|
291 |
|
<---------- [{protocol}] The server sends the |
292 |
|
protocol identifier |
293 |
< |
|
293 |
> |
|
294 |
|
[{name}] ----------> The client sends its |
295 |
|
"name". This name |
296 |
|
is used to identify |
298 |
|
to the system and |
299 |
|
obtain its config |
300 |
|
eg, Conient |
301 |
< |
|
301 |
> |
|
302 |
|
<---------- [OK] Indicates the server |
303 |
|
is ok to proceed |
304 |
< |
|
304 |
> |
|
305 |
|
|
306 |
|
<command #1> (allows client to obtain its configuration) |
307 |
|
[STARTCONFIG]----------> Tell the server we |
308 |
|
want to start this |
309 |
|
command |
310 |
< |
|
310 |
> |
|
311 |
|
<---------- [OK] Indicates the server |
312 |
|
is ok to proceed |
313 |
< |
|
313 |
> |
|
314 |
|
********** LOOP START ********** |
315 |
|
This loop reads configuration |
316 |
|
properties from the config |
321 |
|
config file |
322 |
|
Clients can obtain |
323 |
|
host information |
324 |
< |
eg, |
324 |
> |
eg, |
325 |
|
Host.UDPUpdateTime |
326 |
|
Otherwise it must |
327 |
|
prefix requests |
329 |
|
All other requests |
330 |
|
will be ignored as |
331 |
|
if it was unable to |
332 |
< |
retieve the property |
333 |
< |
|
332 |
> |
retrieve the |
333 |
> |
property |
334 |
> |
|
335 |
|
<---------- [{value}|ERROR]Returns the value of |
336 |
|
the requested config |
337 |
|
property |
338 |
|
eg, 120 |
339 |
|
If it is unable to |
340 |
< |
find the requested |
340 |
> |
find the requested |
341 |
|
property it returns |
342 |
|
ERROR to indicate |
343 |
|
that fact |
344 |
< |
|
344 |
> |
|
345 |
|
********** LOOP UNTIL ********** |
346 |
|
The loop continues until the client |
347 |
|
sends the following message |
348 |
< |
|
349 |
< |
[ENDCONFIG] ----------> Indicates that the |
348 |
> |
|
349 |
> |
[ENDCONFIG] ----------> Indicates that the |
350 |
|
client requires no |
351 |
|
more config |
352 |
< |
|
352 |
> |
|
353 |
|
********** LOOP END ********** |
354 |
|
Communication continues |
355 |
< |
|
355 |
> |
|
356 |
|
<---------- [OK] Indicates that the |
357 |
|
server is ready to |
358 |
|
proceed |
361 |
|
[STARTDATA] ----------> Tell the server we |
362 |
|
want to start this |
363 |
|
command |
364 |
< |
|
364 |
> |
|
365 |
|
<---------- [{portnumber} The server then sets |
366 |
|
|ERROR] itself listening for |
367 |
|
a connection on its |
371 |
|
that it is listening |
372 |
|
on eg, 12367 |
373 |
|
If the data link is |
374 |
< |
yet to be started |
375 |
< |
the server will |
376 |
< |
return ERROR |
377 |
< |
|
378 |
< |
<---------- [OK] Indicates the server |
379 |
< |
is ok to proceed and |
380 |
< |
the client can |
381 |
< |
then connect its |
383 |
< |
data link |
374 |
> |
already started the |
375 |
> |
server will return |
376 |
> |
ERROR |
377 |
> |
|
378 |
> |
<---------- [OK] Indicates the client |
379 |
> |
has successfully |
380 |
> |
connected to the |
381 |
> |
data socket. |
382 |
|
|
383 |
|
<command #3> (tells the server to stop the data link) |
384 |
|
[STOPDATA] ----------> Tell the server we |
385 |
|
want to start this |
386 |
|
command |
387 |
|
The server then |
388 |
< |
shuts down the |
388 |
> |
shuts down the |
389 |
|
data link to the |
390 |
|
client |
391 |
|
|
401 |
|
client wants to |
402 |
|
close the control |
403 |
|
link |
404 |
< |
|
404 |
> |
|
405 |
|
<---------- [OK] The last word from |
406 |
|
the server, it will |
407 |
< |
disappear after this |
407 |
> |
disappear after |
408 |
> |
this, and close the |
409 |
> |
data link if |
410 |
> |
required |
411 |
|
------------------------------------------------------------ |
412 |
|
|
413 |
|
v1.1 - Protocol identifier: "PROTOCOL 1.1" (without quotes) |
421 |
|
[SETHOSTLIST]----------> Tell the server we |
422 |
|
want to start this |
423 |
|
command |
424 |
< |
|
424 |
> |
|
425 |
|
<---------- [OK|ERROR] The server will |
426 |
|
return an ERROR if |
427 |
|
the data link is |
428 |
|
open, as a host list |
429 |
< |
must ONLY be set |
429 |
> |
must ONLY be set |
430 |
|
if the data link is |
431 |
|
closed |
432 |
|
If the server is |
441 |
|
recieve data from |
442 |
|
eg, |
443 |
|
raptor.ukc.ac.uk;killigrew.ukc.ac.uk;chalk.ukc.ac.uk |
444 |
< |
|
444 |
> |
|
445 |
|
If the list is sent |
446 |
|
blank (or if no list |
447 |
|
is set at all) then |
448 |
|
data from ALL hosts |
449 |
|
will be sent to the |
450 |
< |
client |
451 |
< |
|
450 |
> |
client (this is the |
451 |
> |
default if no |
452 |
> |
SETHOSTLIST is not |
453 |
> |
run by the client |
454 |
> |
|
455 |
|
<---------- [OK] Indicates the server |
456 |
|
is ok to proceed and |
457 |
< |
the host list has |
457 |
> |
the host list has |
458 |
|
been accepted |
459 |
|
------------------------------------------------------------ |
460 |
|
|
461 |
|
Client Data Protocol |
462 |
|
-------------------- |
463 |
|
Once the data link has been opened by the control link, the |
464 |
< |
server will send XML formated data packets seperated by the |
465 |
< |
\n (newline) character. For information on the format of |
464 |
> |
server will send XML formatted data packets separated by the |
465 |
> |
\n (newline) character. For information on the format of |
466 |
|
this data see the XML via UDP specification document at: |
467 |
|
|
468 |
|
http://www.i-scream.org.uk/cgi-bin/docs.cgi?doc=specification/xml_via_udp.txt |