~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to doc/devel/rfe/event_mirror.txt

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
event_mirror: Highlevel functions for mirroring (master) object lists
 
2
 
 
3
1 General
 
4
Lists held by qmaster can be mirrored using the event client interface.
 
5
 
 
6
The module provides an abstraction layer on top of the event client interface, 
 
7
that allows to mirror object lists from qmaster.
 
8
 
 
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.
 
13
 
 
14
Examples for such clients are 
 
15
- schedulers
 
16
- proxies
 
17
- monitoring tools (also our qmon GUI)
 
18
 
 
19
2 Functionality
 
20
The module provides several functions described in the following text.
 
21
 
 
22
2.1 Initialization
 
23
Use the functions provided by the event client interface:
 
24
ec_prepare_registration()
 
25
ec_register()
 
26
 
 
27
To set event client specific behaviour, the following functions of the event client interface can be used:
 
28
ec_set_edtime()
 
29
ec_set_busy_handling()
 
30
 
 
31
2.2 Subscription
 
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  
 
41
 
 
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
 
46
- clientdata 
 
47
 
 
48
The subscribe function will store callbacks and subscribe the events using 
 
49
the event client interface.
 
50
 
 
51
If special handling of events (e.g. flushing) shall be used, the corresponding 
 
52
functions of the event client interface can be called:
 
53
ec_set_flush()
 
54
ec_unset_flush()
 
55
 
 
56
Do we need an unsubscribe function?
 
57
Yes, for completeness of the interface.
 
58
Information to be specified: 
 
59
- object type
 
60
The following actions will be taken by an unsubscribe function:
 
61
- unsubscribe low level events
 
62
- destroy mirrored lists
 
63
 
 
64
2.3 GetData
 
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
 
70
 
 
71
2.4 Shutdown
 
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.
 
79
 
 
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.
 
83
 
 
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
 
90
 
 
91