summaryrefslogtreecommitdiff
path: root/src/documentation/content/xdocs/Management Design notes.html
blob: f16fa90f990271a781c6457c21ae2965f140acb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
<html>
    <head>
        <title>Apache Qpid : Management Design notes</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            Apache Qpid : Management Design notes
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Feb 06, 2008 by <font color="#0050B2">cctrieloff</font>.
				    </div>

				    <p>Management design notes:</p>

<ul>
	<li>The schema is checked into svn.</li>
</ul>



<p>Todo / info to fill out:</p>

<ul class="alternate" type="square">
	<li>Gateway defintions for SNMP, JMX etc..</li>
</ul>



<h2><a name="ManagementDesignnotes-ManagementRequirements"></a>Management Requirements</h2>

<ul>
	<li>Must operate from a formally defined management schema.</li>
	<li>Must natively use the AMQP protocol and its type system.</li>
	<li>Must support the following operations
	<ul>
		<li>SET operation on configurable (persistent) aspects of objects</li>
		<li>GET operation on all aspects of objects</li>
		<li>METHOD invocation on schema-defined object-specific methods</li>
		<li>Distribution of unsolicited periodic updates of instrumentation data
		<ul>
			<li>Data updates shall carry an accurate sample timestamp for rate calculation</li>
			<li>Updates shall carry object create/delete timestamps.</li>
			<li>Transient objects shall be fully accounted for via updates.  Note that short-lived transient objects may come and go within a single update interval.  All of the information pertaining to such an object must be captured and transmitted.</li>
		</ul>
		</li>
		<li>Distribution of unsolicited event and/or alert indications (schema defined)</li>
	</ul>
	</li>
	<li>Role-based access control at object, operation, and method granularity</li>
	<li>End-to-end encryption and signing of management content</li>
	<li>Schema must be self-describing so the management client need not have prior knowledge of the management model of the system under management.</li>
	<li>Must be extensible to support the management of objects beyond the AMQP component set.  This allows AMQP to be used as a general-purpose management protocol.</li>
</ul>


<h2><a name="ManagementDesignnotes-ArchitecturalFramework"></a>Architectural Framework</h2>

<p>There are two primary interfaces defined in the management architecture:</p>
<ol>
	<li>The Management Console Interface is used by management clients (CLIs, GUIs, console servers, etc.) to remotely access management data.</li>
	<li>The Extension Interface is used by software components (not necessarily related to the AMQP infrastructure) to provide access to their managed objects.</li>
</ol>


<div class="preformatted"><div class="preformattedContent">
<pre>        +---------+    +---------+        +---------+
        |         |    |         |        |         |
        | CLI/GUI |    | Console |&lt;======&gt;| CLI/GUI |
        |         |    | Server  |        |         |
        +---------+    |         |        +---------+
             ^         +---------+
             |              ^
             |              |
             v              v
        +---------------------------------+
        |                                 |
        |   Managed AMQP Infrastructure   |
        |                                 |
        +---------------------------------+
                      ^
                      |
                      v
                +------------+
                |            |-+
                | Management | |-+
                | Extensions | | |
                |            | | |
                +------------+ | |
                  +------------+ |
                    +------------+
</pre>
</div></div>

<p>Both management interfaces are based on the AMQP protocol and its type system.</p>

<h2><a name="ManagementDesignnotes-DefinitionsofTerms"></a>Definitions of Terms</h2>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'>class </td>
<td class='confluenceTd'> A type definition for a manageable object.</td>
</tr>
<tr>
<td class='confluenceTd'>package </td>
<td class='confluenceTd'> A grouping of class definitions that are related to a single software component.  The package concept is used to extend the management schema beyond just the AMQP software components.</td>
</tr>
<tr>
<td class='confluenceTd'>object </td>
<td class='confluenceTd'> Also "manageable object".  An instantiation of a class.  An object represents a physical or logical component in the core function of the system under management.</td>
</tr>
<tr>
<td class='confluenceTd'>configuration element </td>
<td class='confluenceTd'> A typed member of a class which represents a configurable attribute of the class.  Configurable attributes are persistent on the system under management (i.e. they are inherent to the system or are stored in a configuration file on the system).</td>
</tr>
<tr>
<td class='confluenceTd'>instrumentation element </td>
<td class='confluenceTd'> A typed member of a class which represents an instrumentation attribute of the class.  Instrumentation elements are typically counters or state values.</td>
</tr>
<tr>
<td class='confluenceTd'>method </td>
<td class='confluenceTd'> A member of a class which represents a callable procedure on an object of the class.  Methods may have an arbitrary set of typed arguments and may supply a return code.  Methods typically have side effects on the associated object.</td>
</tr>
<tr>
<td class='confluenceTd'>event </td>
<td class='confluenceTd'> A member of a class which represents the occurence of an event of interest within the system under management.</td>
</tr>
<tr>
<td class='confluenceTd'>management agent </td>
<td class='confluenceTd'> A software component built into the broker that handles management traffic and distributes management data.</td>
</tr>
</tbody></table>

<h2><a name="ManagementDesignnotes-TheManagementExchange"></a>The Management Exchange</h2>

<p>The management exchange (called "qpid.management" currently) is a special type of exchange used for remote management access to the Qpid broker.  The management exchange is an extension of the standard "Topic" exchange.  It behaves like a topic exchange with the following exceptions:</p>
<ol>
	<li>When a queue is successfully bound to the exchange, a method is invoked on the broker's management agent to notify it of the presence of a new remote managment client.</li>
	<li>When messages arrive at the exchange for routing, the exchange examines the message's routing key and if the key represents a management command or method, it routes it directly to the management agent rather than routing it to queues using the topic algorithm.<br/>
The management exchange is used by the management agent to distribute unsolicited management data.  Such data is classified by the routing key allowing management clients to register for only the data they need.</li>
</ol>


<h2><a name="ManagementDesignnotes-ManagementMessageProtocol"></a>Management Message Protocol</h2>

<p>The principals in a management exchange are the <em>management client</em> and the <em>management agent</em>.  The management agent is integrated into the AMQP broker and the management client is a remote entity.  A management agent may be managed by zero or more management clients at any given time.  Additionally, a management client may manage multiple management agents at the same time.</p>

<p>For authentication and access control, management relies on the mechanisms supplied by the AMQP protocol.</p>

<h3><a name="ManagementDesignnotes-EstablishingCommunicationBetweenClientandAgent"></a>Establishing Communication Between Client and Agent</h3>

<p>Communication is established between the management client and management agent using normal AMQP procedures.  The client creates a connection to the broker and then establishes a session with its corresponding channel.</p>

<p>Two private queues are then declared (only one if method invocation is not needed).  A management queue is declared and bound to the qpid.management exchange.  If the binding key is "mgmt.#", all management-related messages sent to the exchange will be received by this client.  A more specific binding key will result in a more restricted set of messages being received (see the section on Routing Key Structure below).</p>

<p>If methods are going to be invoked on managed objects, a second private queue must be declared so the client can receive method replies.  This queue is bound to the amq.direct exchange using a routing key equal to the name of the queue.</p>

<p>When a client successfully binds to the qpid.management exchange, the management agent schedules a schema broadcast to be sent to the exchange.  The agent will publish, via the exchange, a description of the schema for all manageable objects in its control.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>      Client                                                          Agent
        |                                                               |
        | --- AMQP Connection and Session Setup ----------------------&gt; |
        |                                                               |
        | --- Queue.declare (private data queue) ---------------------&gt; |
        | --- Bind queue to exchange 'qpid.management' key 'mgmt.#' --&gt; |
        |                                                               |
        | --- Queue.declare (private method-reply queue) -------------&gt; |
        | --- Bind queue to exchange 'amq.direct' --------------------&gt; |
        |                                                               |
        | &lt;------- Management schema via exchange 'qpid.management' --- |
        |                                                               |
</pre>
</div></div>

<h3><a name="ManagementDesignnotes-BroadcastofConfigurationandInstrumentationUpdates"></a>Broadcast of Configuration and Instrumentation Updates</h3>

<p>The management agent will periodically publish updates to the configuration and instrumentation of management objects under its control.  Under normal circumstances, these updates are published only if they have changed since the last time they were published.  Configuration updates are only published if configuration has changed and instrumentation updates are only published if instrumentation has changed.  The exception to this rule is that after a management client binds to the qpid.management exchange, all configuration and instrumentation records are published as though they had changed whether or not they actually did.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>      Client                                                          Agent
        |                                                               |
        | &lt;-------------- Object Configurations via 'mgmt.config.#' --- | |
        | &lt;--------------- Object Instrumentation via 'mgmt.inst.#' --- | |
        |                                                               | |
        |                                                               | | Publish Interval
        |                                                               | |
        |                                                               | |
        |                                                               | V
        | &lt;-------------- Object Configurations via 'mgmt.config.#' --- |
        | &lt;--------------- Object Instrumentation via 'mgmt.inst.#' --- |
        |                                                               |
</pre>
</div></div>

<h3><a name="ManagementDesignnotes-InvokingaMethodonaManagedObject"></a>Invoking a Method on a Managed Object</h3>

<p>When the management client wishes to invoke a method on a managed object, it sends a method request message to the qpid.management exchange.  The routing key contains the object class and method name (refer to Routing Key Structure below).  The method request must have a header entry (reply-to) that contains the name of the method-reply queue so that the method response can be properly routed back to the requestor.</p>

<p>The method request contains a sequence number that is copied to the method reply.  This number is opaque to the management agent and may be used by the management client to correlate the reply to the request.  The asynchronous nature of requests and replies allows any number of methods to be in-flight at a time.  Note that there is no guarantee that methods will be replied to in the order in which they were requested.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>      Client                                                          Agent
        |                                                               |
        | --- Method Request (to exchange 'qpid.management') ---------&gt; |
        |                                                               |
        |                                                               |
        | &lt;--------------- Method Reply (via exchange 'amq.direct') --- |
        |                                                               |
</pre>
</div></div>

<h2><a name="ManagementDesignnotes-RoutingKeyStructure"></a>Routing Key Structure</h2>

<p>As noted above, the structure of the binding and routing keys used on the management exchange is important to the function of the management architecture.  The routing key of a management message determines:</p>
<ol>
	<li>The type of message (i.e. operation request or unsolicited update).</li>
	<li>The class of the object that the message pertains to.</li>
	<li>The specific operation or update type.</li>
	<li>The namespace in which the class belongs.  This allows for plug-in expansion of the management schema for manageable objects that are outside of the broker itself.</li>
</ol>


<p>Placing this information in the routing key provides the ability to enforce access control at class, operation, and method granularity.  It also separates the command structure from the content of the management message (i.e. element values) allowing the content to be encrypted and signed end-to-end while still allowing access control at the message-transport level.  This means that special access control code need not be written for the management agent.<br/>
There are two general types of routing/binding key:</p>
<ul>
	<li><b>Command</b> keys have the structure: <tt>method.&lt;package&gt;.&lt;class&gt;.&lt;method&gt;</tt> where
	<ul>
		<li><tt>&lt;package&gt;</tt> is the namespace in which the &lt;class&gt; name is valid,</li>
		<li><tt>&lt;class&gt;</tt> is the name of the class as defined in the schema, and</li>
		<li><tt>&lt;method&gt;</tt> is one of "get", "set", or a schema-defined class-specific method name.</li>
	</ul>
	</li>
	<li><b>Unsolicited</b> keys have the structure: <tt>mgmt.&lt;type&gt;.&lt;package&gt;.&lt;class&gt;.&lt;severity&gt;</tt> where
	<ul>
		<li><tt>&lt;type&gt;</tt> is one of "schema", "config", "inst", or "event",</li>
		<li><tt>&lt;package&gt;</tt> is the namespace in which the &lt;class&gt; name is valid, and</li>
		<li><tt>&lt;class&gt;</tt> is the name of the class as defined in the schema.</li>
		<li><tt>&lt;severity&gt;</tt> is relevant for events only.  It is one of "critical", "error", "warning", or "info".</li>
	</ul>
	</li>
</ul>


<p>In both cases, the content of the message (i.e. method arguments, element values, etc.) is carried in the body segment of the message.</p>

<p>The <tt>&lt;package&gt;</tt> namespace allows this management framework to be extended with the addition of other software packages.</p>

<h2><a name="ManagementDesignnotes-ManagementMessageBodyStructure"></a>Management Message Body Structure</h2>

<p>The body segments of management messages are composed of sequences of binary-encoded data fields, in a manner consistent with the 0-10 version of the AMQP specification.</p>

<p>All management messages begin with a message header:</p>

<div class="preformatted"><div class="preformattedContent">
<pre>          octet 0      1         2         3         4         5
        +---------+---------+---------+---------+---------+---------+
        |   'A'   |   'M'   |   '0'   |   '1'   | opcode  |  class  |
        +---------+---------+---------+---------+---------+---------+
</pre>
</div></div>

<p>The first four octets contain the protocol <b>magic number</b> "AM01" which is used to identify the type and version of the message.</p>

<p>The <b>opcode</b> field identifies the operation represented by the message:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>opcode</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>'S'</td>
<td class='confluenceTd'>This message contains a schema record which describes the full schema description for a single object class</td>
</tr>
<tr>
<td class='confluenceTd'>'C'</td>
<td class='confluenceTd'>This message contains a content record.  Content records contain the values of all configuration or instrumentation elements in an object.  Such records are broadcast on a periodic interval if 1) a change has been made in the value of one of the elements, or 2) if a new management client has bound a queue to the management exchange.</td>
</tr>
<tr>
<td class='confluenceTd'>'M'</td>
<td class='confluenceTd'>This message contains a method request</td>
</tr>
<tr>
<td class='confluenceTd'>'R'</td>
<td class='confluenceTd'>This message contains a method reply</td>
</tr>
</tbody></table>

<p>The <b>class</b> field identifies the type of content data in a content record.  If the opcode is not 'C', this field must be set to zero.</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>class</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>'C'</td>
<td class='confluenceTd'>Configuration content</td>
</tr>
<tr>
<td class='confluenceTd'>'I'</td>
<td class='confluenceTd'>Instrumentation content</td>
</tr>
</tbody></table>

<h3><a name="ManagementDesignnotes-SchemaMessages"></a>Schema Messages</h3>

<p>Schema messages are published periodically if 1) the first instance of the object class has been created, or 2) a new management client has bound a queue to the management exchange.  A schema message contains all schema-related data for a single object class.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>        +-----+-----+-----+-----+-----+-----+
        | 'A' | 'M' | '0' | '1' | 'S' |  0  |
        +-----+-----+-----+-----+-----+-----+----------------------+
        |                packageName (short string)                |
        +----------------------------------------------------------+
        |                className (short string)                  |
        +----------------------------------------------------------+
        |                schema-hash (bin128)                      |
        +-----------+-----------+-----------+-----------+----------+
        | configCnt |  instCnt  | methodCnt | eventCnt  |
        +-----------+-----------+-----------+-----------+----------------------------+
        | configCnt config-element records                                           |
        +----------------------------------------------------------------------------+
        | instCnt   instrumentation-element records                                  |
        +----------------------------------------------------------------------------+
        | methodCnt method records                                                   |
        +----------------------------------------------------------------------------+
        | eventCnt  event records                                                    |
        +----------------------------------------------------------------------------+
</pre>
</div></div>

<p>Each <b>config-element</b> record is an AMQP field table with the following fields.  Optional fields may optionally be omitted from the field table.</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>field name</b></td>
<td class='confluenceTd'><b>optional</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>name</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Name of the configuration element</td>
</tr>
<tr>
<td class='confluenceTd'>type</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Type code for the element</td>
</tr>
<tr>
<td class='confluenceTd'>access</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Access code for the element</td>
</tr>
<tr>
<td class='confluenceTd'>index</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>1 = index element, 0 = not an index element</td>
</tr>
<tr>
<td class='confluenceTd'>unit</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Units for numeric values (i.e. seconds, bytes, etc.)</td>
</tr>
<tr>
<td class='confluenceTd'>min</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Minimum value for numerics</td>
</tr>
<tr>
<td class='confluenceTd'>max</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Maximum value for numerics</td>
</tr>
<tr>
<td class='confluenceTd'>maxlen</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Maximum length for strings</td>
</tr>
<tr>
<td class='confluenceTd'>desc</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Description of the element</td>
</tr>
</tbody></table>

<p>Each <b>instrumentation-element</b> record is an AMQP field table with the following fields:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>field name</b></td>
<td class='confluenceTd'><b>optional</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>name</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Name of the instrumentation element</td>
</tr>
<tr>
<td class='confluenceTd'>type</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Type code for the element</td>
</tr>
<tr>
<td class='confluenceTd'>unit</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Units for numeric values (i.e. seconds, bytes, etc.)</td>
</tr>
<tr>
<td class='confluenceTd'>desc</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Description of the element</td>
</tr>
</tbody></table>

<p><b>method</b> and <b>event</b> records contain a main field table that describes the method or header followed by zero or more field tables describing arguments.  The main field table contains the following fields:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>field name</b></td>
<td class='confluenceTd'><b>optional</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>name</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Name of the method or event</td>
</tr>
<tr>
<td class='confluenceTd'>argCount</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Number of argument records to follow</td>
</tr>
<tr>
<td class='confluenceTd'>desc</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Description of the method or event</td>
</tr>
</tbody></table>

<p>Argument field tables contain the following fields:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>field name</b></td>
<td class='confluenceTd'><b>method</b></td>
<td class='confluenceTd'><b>event</b></td>
<td class='confluenceTd'><b>optional</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>name</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Argument name</td>
</tr>
<tr>
<td class='confluenceTd'>type</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>Type code for the argument</td>
</tr>
<tr>
<td class='confluenceTd'>dir</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Direction code for method arguments</td>
</tr>
<tr>
<td class='confluenceTd'>unit</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Units for numeric values (i.e. seconds, bytes, etc.)</td>
</tr>
<tr>
<td class='confluenceTd'>min</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Minimum value for numerics</td>
</tr>
<tr>
<td class='confluenceTd'>max</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Maximum value for numerics</td>
</tr>
<tr>
<td class='confluenceTd'>maxlen</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Maximum length for strings</td>
</tr>
<tr>
<td class='confluenceTd'>desc</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Description of the argument</td>
</tr>
<tr>
<td class='confluenceTd'>default</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>no</td>
<td class='confluenceTd'>yes</td>
<td class='confluenceTd'>Default value for the argument</td>
</tr>
</tbody></table>

<p><b>type codes</b> are numerics with the following values:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>value</b></td>
<td class='confluenceTd'><b>type</b></td>
</tr>
<tr>
<td class='confluenceTd'>1</td>
<td class='confluenceTd'>uint8</td>
</tr>
<tr>
<td class='confluenceTd'>2</td>
<td class='confluenceTd'>uint16</td>
</tr>
<tr>
<td class='confluenceTd'>3</td>
<td class='confluenceTd'>uint32</td>
</tr>
<tr>
<td class='confluenceTd'>4</td>
<td class='confluenceTd'>uint64</td>
</tr>
<tr>
<td class='confluenceTd'>6</td>
<td class='confluenceTd'>short string</td>
</tr>
<tr>
<td class='confluenceTd'>7</td>
<td class='confluenceTd'>long string</td>
</tr>
</tbody></table>

<p><b>access codes</b> are numerics with the following values:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>value</b></td>
<td class='confluenceTd'><b>access</b></td>
</tr>
<tr>
<td class='confluenceTd'>1</td>
<td class='confluenceTd'>Read-Create access</td>
</tr>
<tr>
<td class='confluenceTd'>2</td>
<td class='confluenceTd'>Read-Write access</td>
</tr>
<tr>
<td class='confluenceTd'>3</td>
<td class='confluenceTd'>Read-Only access</td>
</tr>
</tbody></table>

<p><b>direction codes</b> are numerics with the following values:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>value</b></td>
<td class='confluenceTd'><b>direction</b></td>
</tr>
<tr>
<td class='confluenceTd'>1</td>
<td class='confluenceTd'>Input (from client to broker)</td>
</tr>
<tr>
<td class='confluenceTd'>2</td>
<td class='confluenceTd'>Output (from broker to client)</td>
</tr>
<tr>
<td class='confluenceTd'>3</td>
<td class='confluenceTd'>IO (bidirectional)</td>
</tr>
</tbody></table>

<h3><a name="ManagementDesignnotes-ConfigurationandInstrumentationContentMessages"></a>Configuration and Instrumentation Content Messages</h3>

<p>Content messages are published when changes are made to the values of content or instrumentation elements or when new management clients bind a queue to the management exchange.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>        +-----+-----+-----+-----+-----+-----+
        | 'A' | 'M' | '0' | '1' | 'C' | cls |
        +-----+-----+-----+-----+-----+-----+----------------------+
        |                packageName (short string)                |
        +----------------------------------------------------------+
        |                className (short string)                  |
        +----------------------------------------------------------+
        |                class hash (bin128)                       |
        +-----+-----+-----+-----+-----+-----+-----+-----+----------+
        | timestamp of current sample (datetime)        |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | time object was created (datetime)            |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | time object was deleted (datetime)            |
        +-----+-----+-----+-----+-----+-----+-----+-----+
        | objectId (uint64)                             |
        +-----+-----+-----+-----+-----+-----+-----+-----+------------------------+
        | config/inst values (in schema order)                                   |
        +------------------------------------------------------------------------+
</pre>
</div></div>

<p>All timestamps are uint64 values representing nanoseconds since the epoch (January 1, 1970).  The objectId is a uint64 value that uniquely identifies this object instance.</p>

<p>The element values are encoded by their type into the message in the order in which they appeared in the schema message.</p>

<h3><a name="ManagementDesignnotes-MethodRequestandReplyMessages"></a>Method Request and Reply Messages</h3>

<p>Method request messages have the following structure.  The sequence number is opaque to the management agent.  It is returned unchanged in the method reply so the calling client can correctly associate the reply to the request.  The objectId is the unique ID of the object on which the method is to be executed.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>        +-----+-----+-----+-----+-----+-----+
        | 'A' | 'M' | '0' | '1' | 'M' |  0  |
        +-----+-----+-----+-----+-----+-----+
        |  sequence number      |
        +-----------------------+-----------------------+
        |  objectId                                     |
        +-----------------------------------------------+------------------------+
        |  input and bidirectional argument values (in schema order)             |
        +------------------------------------------------------------------------+
</pre>
</div></div>

<p>Method reply messages have the following structure.  The sequence number is identical to that supplied in the method request.  The status code (and text) indicate whether or not the method was successful and if not, what the error was.  Output and bidirectional arguments are only included if the status code was 0 (STATUS_OK).</p>

<div class="preformatted"><div class="preformattedContent">
<pre>        +-----+-----+-----+-----+-----+-----+
        | 'A' | 'M' | '0' | '1' | 'R' |  0  |
        +-----+-----+-----+-----+-----+-----+
        |  sequence number      |
        +-----------------------+
        |  status code          |
        +-----------------------+----------------------------------+
        |  status text (short string)                              |
        +-----------------------+----------------------------------+-------------+
        |  output and bidirectional argument values (in schema order)            |
        +------------------------------------------------------------------------+
</pre>
</div></div>

<p><b>status code</b> values are:</p>

<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><b>value</b></td>
<td class='confluenceTd'><b>description</b></td>
</tr>
<tr>
<td class='confluenceTd'>0</td>
<td class='confluenceTd'> STATUS_OK - successful completion</td>
</tr>
<tr>
<td class='confluenceTd'>1</td>
<td class='confluenceTd'> STATUS_UNKNOWN_OBJECT - objectId not found in the agent</td>
</tr>
<tr>
<td class='confluenceTd'>2</td>
<td class='confluenceTd'> STATUS_UNKNOWN_METHOD - method is not known by the object type</td>
</tr>
<tr>
<td class='confluenceTd'>3</td>
<td class='confluenceTd'> STATUS_NOT_IMPLEMENTED - method is not currently implemented</td>
</tr>
</tbody></table>

				    					    <br/>
                        <div class="tabletitle">
                            <a name="attachments">Attachments:</a>
                        </div>

                        <div class="greybox" align="left">
                                                            <img src="icons/bullet_blue.gif" height="8" width="8" alt=""/>
                                <a href="Management Design notes_attachments/QpidMgmtSchema.xml">QpidMgmtSchema.xml</a> (text/xml)
                                <br/>
                                                    </div>
				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td>
		    </tr>
	    </table>
    </body>
</html>