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