1
event_mirror: Highlevel functions for mirroring (master) object lists
4
Lists held by qmaster can be mirrored using the event client interface.
6
The module provides an abstraction layer on top of the event client interface,
7
that allows to mirror object lists from qmaster.
9
This interface can be used to implement clients having to access up to date
10
information from qmaster over a certain time period.
11
The mirroring (event client) interface should be used instead of regularly
12
polling the actual information.
14
Examples for such clients are
17
- monitoring tools (also our qmon GUI)
20
The module provides several functions described in the following text.
23
Use the functions provided by the event client interface:
24
ec_prepare_registration()
27
To set event client specific behaviour, the following functions of the event client interface can be used:
29
ec_set_busy_handling()
32
Here we have to request which lists shall be mirrored.
33
The following information has to be specified:
34
- object type: Higher level subscription than in the event client interface,
35
which requires to subscribe several events per object type
36
(object type + operation)
37
- callback: A callback function can be specified that will be called after an
38
event has been processed and the lists have been updated. Special client
39
specific handling of events can be implemented in callback functions.
40
- clientdata to be passed to the callback function
42
A callback function will be passed the following information:
43
- object type (job, queue, ...)
44
- action (initial list received, add, modify, delete)
45
- if an individual object has changed, the corresponding lListElem
48
The subscribe function will store callbacks and subscribe the events using
49
the event client interface.
51
If special handling of events (e.g. flushing) shall be used, the corresponding
52
functions of the event client interface can be called:
56
Do we need an unsubscribe function?
57
Yes, for completeness of the interface.
58
Information to be specified:
60
The following actions will be taken by an unsubscribe function:
61
- unsubscribe low level events
62
- destroy mirrored lists
65
The user of the mirroring interface has to call the GetData function in
66
regular intervals. It will do the following actions:
67
- receive events from qmaster
68
- update mirrored lists
69
- if requested, call callback functions
72
On shutdown of a program using the mirroring interface or when the mirroring
73
functionality is no longer needed, a shutdown function has to be called,
74
which does the following actions:
75
- deregister from qmaster
76
- destroy all mirrored lists
77
A client that shutdown mirroring can restart mirroring by calling the
78
initialization functions.
80
2.5 Neccessary changes in the event client interface:
81
If an event is unsubscribed, qmaster has to scan the event list for the
82
associated event client and delete the unsubscribed events.
84
3 Documentation changes:
85
3.1 user/admin guide: no documentation neccessary
86
3.2 man pages: no documentation neccessary
87
3.3 -help output: for a demo client? qevent?
88
3.4 documented interfaces: yes, gdi lib module
89
3.5 messages: new messages are generated