forked from RedhawkSDR/Documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainch7.html
339 lines (329 loc) · 17.5 KB
/
mainch7.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>7 Services</title>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8"">
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<!-- html,2,next,javascript,charset="utf-8" -->
<meta name="src" content="main.tex">
<meta name="date" content="2013-03-12 19:46:00">
<link rel="stylesheet" type="text/css" href="main.css">
<script type="text/javascript" src="scripts/shCore.js"></script>
<script type="text/javascript" src="scripts/shBrushCpp.js"></script>
<script type="text/javascript" src="scripts/shBrushJava.js"></script>
<script type="text/javascript" src="scripts/shBrushPython.js"></script>
<script type="text/javascript" src="scripts/shBrushBash.js"></script>
<script type="text/javascript" src="scripts/shBrushXml.js"></script>
<link href="styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
</head><body
>
<script>
function f() {
document.getElementById('main_content_wrap').focus();
}
if (window.addEventListener) {
window.addEventListener("load", f, false);
} else if (window.attachEvent) {
window.attachEvent("onload", f);
}
</script>
<div class="header">
<ul class="navbar">
<li><a class="logo-small" href="index.html"><img src="images/RedHawk_Logo_ALT_B_121px.png"/></a></li> <li><a href="index.html">Home</a></li>
<li><a href="gettingstarted/main.html">Getting Started</a></li>
<li><a class="active" href="main.html">Documentation</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="support.html">Support</a></li>
</ul>
<div class="pattern right"></div>
<a id="forkme_banner" href="https://github.com/redhawksdr">View on GitHub</a>
</div>
<!-- Custom MAIN CONTENT -->
<div id="main_content_wrap" tabindex="0" class="outer">
<section id="main_content" class="inner">
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
href="mainch8.html" >next</a>] [<a
href="mainch6.html" >prev</a>] [<a
href="mainch6.html#tailmainch6.html" >prev-tail</a>] [<a
href="#tailmainch7.html">tail</a>] [<a
href="main.html#mainch7.html" >up</a>] </p></div>
<h2 class="chapterHead"><span class="titlemark">Chapter 7</span><br /><a
id="x9-1020007"></a>Services</h2>
<h3 class="sectionHead"><span class="titlemark">7.1 </span> <a
id="x9-1030007.1"></a>Introduction</h3>
<!--l. 6--><p class="noindent" >In the context of REDHAWK, infrastructure software is managed by the <a
href="mainli2.html#glo:devicemanager">Device Manager</a>.
Infrastructure software can take two forms: hardware management and system <a
href="mainli2.html#glo:service">Services</a>. Hardware
management was discussed in <a
href="mainch8.html#x10-1130008">Chapter 8</a>. System <a
href="mainli2.html#glo:service">Services</a> are the equivalent to Linux services like
an Hyper Text Transport Protocol (<a
href="mainap3.html#http">HTTP</a>) server; the <a
href="mainli2.html#glo:service">Service</a> does not directly control
hardware but is some facility that becomes automatically available when the host is
started.
<!--l. 12--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">7.2 </span> <a
id="x9-1040007.2"></a>Management</h3>
<!--l. 15--><p class="noindent" >A <a
href="mainli2.html#glo:service">Service</a> is managed through the <a
href="mainli2.html#glo:devicemanager">Device Manager</a>. In <a
href="mainch8.html#x10-1130008">Chapter 8</a>, <a
href="mainli2.html#glo:node">Nodes</a> were described as a
<a
href="mainli2.html#glo:devicemanager">Device Manager</a> instance and the set of <a
href="mainli2.html#glo:device">Devices</a> and <a
href="mainli2.html#glo:service">Services</a> associated with that <a
href="mainli2.html#glo:devicemanager">Device Manager</a>
instance. When the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> instance is created, it reads its configuration file (<span
class="cmtt-12">dcd.xml</span>),
which contains a list of all <a
href="mainli2.html#glo:device">Devices</a> and <a
href="mainli2.html#glo:service">Services</a> that the <a
href="mainli2.html#glo:node">Node</a> contains. The <a
href="mainli2.html#glo:device">Devices</a>
and <a
href="mainli2.html#glo:service">Services</a> are forked as individual processes and remain running until the <a
href="mainli2.html#glo:devicemanager">Device
Manager</a> is shut down. <a
href="mainli2.html#glo:device">Devices</a> are bound to the <a
href="mainli2.html#glo:namingservice">Naming Service</a> under the <a
href="mainli2.html#glo:devicemanager">Device
Manager</a>’s context. <a
href="mainli2.html#glo:service">Services</a>, on the other hand, are bound to the <a
href="mainli2.html#glo:domain">Domain</a>’s naming
context.
<!--l. 24--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">7.3 </span> <a
id="x9-1050007.3"></a>Files Defining a Service</h3>
<!--l. 26--><p class="noindent" >A <a
href="mainli2.html#glo:service">Service</a>, much like a <a
href="mainli2.html#glo:component">Component</a> or <a
href="mainli2.html#glo:device">Device</a>, is a binary file and a set of <a
href="mainap3.html#xml">XML</a> descriptors,
normally just the <a
href="mainap3.html#spd">SPD</a> (describing the <a
href="mainli2.html#glo:service">Service</a>’s software package) and <a
href="mainap3.html#scd">SCD</a> (describing the
<a
href="mainli2.html#glo:service">Service</a>’s interfaces). The <a
href="mainli2.html#glo:service">Service</a> file package resides in <span
class="cmtt-12">$SDRROOT/dev</span>, usually in a <span
class="cmtt-12">services</span>
subdirectory or the <span
class="cmtt-12">devices </span>subdirectory.
<!--l. 29--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">7.4 </span> <a
id="x9-1060007.4"></a>Service API</h3>
<!--l. 31--><p class="noindent" >REDHAWK does not include any standard <a
href="mainli2.html#glo:service">Service</a> interfaces; the <a
href="mainap3.html#sca">SCA</a> specification includes a
logging service, but in REDHAWK logging is performed through log4j/log4cxx, as described in
<a
href="mainch18.html#x20-24300018">Chapter 18</a>, not a <a
href="mainli2.html#glo:service">Service</a>. To use a <a
href="mainli2.html#glo:service">Service</a>, it either needs to use one of REDHAWK’s
standard interfaces or it needs to implement a specialized interface supporting some specific
behavior.
<!--l. 36--><p class="noindent" >As discussed in <a
href="#x9-1040007.2">Section 7.2</a>, a <a
href="mainli2.html#glo:service">Service</a> is created and torn-down by the <a
href="mainli2.html#glo:devicemanager">Device Manager</a>. Because
there is no defined interface for the <a
href="mainli2.html#glo:service">Service</a>, <a
href="mainli2.html#glo:service">Services</a> do not support the <span
class="cmtt-12">LifeCycle </span>interface, and
more importantly, the <span
class="cmtt-12">releaseObject() </span>method. Since there is no release method, the <a
href="mainli2.html#glo:devicemanager">Device
Manager</a> issues operating-system level signals to terminate the <a
href="mainli2.html#glo:service">Service</a>. It is the <a
href="mainli2.html#glo:service">Service</a>’s
developer’s task to perform whatever cleanup functionality needs to be performed in response to
the receipt of a signal from the operation system.
<!--l. 43--><p class="noindent" >The <span
class="cmtt-12">PropertySet </span>interface is necessary to perform configuration of <a
href="mainli2.html#glo:component">Components</a> and <a
href="mainli2.html#glo:device">Devices</a>.
Since the <a
href="mainli2.html#glo:service">Service</a> package is based on an <a
href="mainap3.html#spd">SPD</a> file, it is possible for the package to include a <a
href="mainap3.html#prf">PRF</a>
file. To deal with instances where the <a
href="mainli2.html#glo:service">Service</a> includes <a
href="mainli2.html#glo:property">Properties</a>, the runtime environment will
check the deployed <a
href="mainli2.html#glo:service">Service</a>’s interface; if the interface inherits from the <span
class="cmtt-12">PropertySet </span>interface, it
allows the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> to contain property overload values for <a
href="mainli2.html#glo:service">Service</a> <a
href="mainli2.html#glo:property">Properties</a>. This feature
of <a
href="mainli2.html#glo:service">Services</a> is optional and a system developer should not assume that any given <a
href="mainli2.html#glo:service">Service</a> supports
the <span
class="cmtt-12">PropertySet </span>interface.
<!--l. 48--><p class="noindent" >
<h3 class="sectionHead"><span class="titlemark">7.5 </span> <a
id="x9-1070007.5"></a>Finding a Service</h3>
<!--l. 50--><p class="noindent" >In <a
href="mainch11.html#x13-15500011">Chapter 11</a> <a
href="mainli2.html#glo:application">Application</a> descriptor files (<span
class="cmtt-12">sad.xml</span>) were described; these files describe a logical
collection of <a
href="mainli2.html#glo:component">Components</a> that are deployed to support some system-level <a
href="mainli2.html#glo:application">Application</a>. In the
<a
href="mainli2.html#glo:application">Application</a> descriptor file, connections between deployed entities can be described in a variety of
ways. These connection descriptions are how an <a
href="mainli2.html#glo:application">Application</a>, or more specifically a <a
href="mainli2.html#glo:component">Component</a> in
an <a
href="mainli2.html#glo:application">Application</a>, can interact with a <a
href="mainli2.html#glo:service">Service</a>.
<!--l. 56--><p class="noindent" >The <span
class="cmmi-12"><</span><span
class="cmtt-12">findby</span><span
class="cmmi-12">> </span>tag allows the runtime environment to find different objects in the <a
href="mainli2.html#glo:domain">Domain</a>. All
three tags available under <span
class="cmtt-12">findby </span>can be used in finding a <a
href="mainli2.html#glo:service">Service</a>: the <span
class="cmmi-12"><</span><span
class="cmtt-12">stringifiedobjectref</span><span
class="cmmi-12">></span>
tag, the <span
class="cmmi-12"><</span><span
class="cmtt-12">namingservice</span><span
class="cmmi-12">> </span>tag, and the <span
class="cmmi-12"><</span><span
class="cmtt-12">domainfinder</span><span
class="cmmi-12">> </span>tag.
<!--l. 59--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">7.5.1 </span> <a
id="x9-1080007.5.1"></a>Find by <span
class="cmtt-12">stringifiedobjectref</span></h4>
<!--l. 60--><p class="noindent" >The <span
class="cmmi-12"><</span><span
class="cmtt-12">stringifiedobjectref</span><span
class="cmmi-12">> </span>tag allows someone to use the explicit Interoperable Object
Reference (<a
href="mainap3.html#ior">IOR</a>) for a <a
href="mainli2.html#glo:service">Service</a> object to find the <a
href="mainli2.html#glo:service">Service</a>. Given that the <a
href="mainap3.html#ior">IOR</a> encodes specialized
information such as the specific host that is running the object, its use is limited to static
systems.
<!--l. 63--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">7.5.2 </span> <a
id="x9-1090007.5.2"></a>Find by <span
class="cmtt-12">namingservice</span></h4>
<!--l. 64--><p class="noindent" >The <span
class="cmmi-12"><</span><span
class="cmtt-12">namingservice</span><span
class="cmmi-12">> </span>tag allows the specification of a <a
href="mainli2.html#glo:service">Service</a> based on its name binding on the
<a
href="mainli2.html#glo:namingservice">Naming Service</a>. This is much more generic than the use of the <a
href="mainap3.html#ior">IOR</a>, but it implies substantial
knowledge regarding the nature of the deployed <a
href="mainli2.html#glo:service">Service</a>, namely the binding name chosen in the
<a
href="mainli2.html#glo:devicemanager">Device Manager</a> and whatever deconflicting strategy the <a
href="mainli2.html#glo:devicemanager">Device Manager</a> might have used to make
sure that the name binding is unique (such as adding an underscore and an instance
number).
<!--l. 67--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">7.5.3 </span> <a
id="x9-1100007.5.3"></a>Find by <span
class="cmtt-12">domainfinder</span></h4>
<!--l. 68--><p class="noindent" >Of most interest with regards to connecting to <a
href="mainli2.html#glo:service">Services</a> is the <span
class="cmmi-12"><</span><span
class="cmtt-12">domainfinder</span><span
class="cmmi-12">> </span>tag. The
<span
class="cmtt-12">domainfinder </span>allows a system developer to describe a <a
href="mainli2.html#glo:domain">Domain</a> mechanism that is used to
find an object. In the case of <a
href="mainli2.html#glo:service">Services</a>, there are two <span
class="cmtt-12">domainfinder </span>types that are of
interest, <span
class="cmtt-12">servicename </span>and <span
class="cmtt-12">servicetype</span>. The <span
class="cmtt-12">servicename </span>type is the name used to
register the <a
href="mainli2.html#glo:service">Service</a> onto the <a
href="mainli2.html#glo:domain">Domain</a>. This name differs from the <a
href="mainli2.html#glo:namingservice">Naming Service</a> name in
that no deconflicting strategy is used in the name; the registered name is the xml-given
name of the <a
href="mainli2.html#glo:service">Service</a>. An example of a <a
href="mainli2.html#glo:service">Service</a> name could be ApacheHttp or <a
href="mainap3.html#http">HTTP</a>
<a
href="mainli2.html#glo:service">Service</a>.
<!--l. 75--><p class="noindent" >
<h5 class="subsubsectionHead"><a
id="x9-1110007.5.3"></a>Using <span
class="cmtt-12">servicename</span></h5>
<!--l. 76--><p class="noindent" >The problem with using a <a
href="mainli2.html#glo:service">Service</a> name is that it limits the ability to connect to <a
href="mainli2.html#glo:service">Services</a> based on
functionality. For example, the use of <a
href="mainap3.html#http">HTTP</a> <a
href="mainli2.html#glo:service">Service</a> name means that there is a single <a
href="mainli2.html#glo:service">Service</a> in
the entire <a
href="mainli2.html#glo:domain">Domain</a> that supports this capability. If two <a
href="mainli2.html#glo:service">Services</a> were available that perform
a similar functionality, the <a
href="mainli2.html#glo:service">Services</a> could be named “ApacheHttp” and “MyHttp”.
At deployment time, the system user would need to know which <a
href="mainli2.html#glo:service">Service</a> is up up to
specify its name. The solution to this problem is to use the <span
class="cmtt-12">servicetype </span>type for the
<span
class="cmtt-12">domainfinder</span>.
<!--l. 82--><p class="noindent" >
<h5 class="subsubsectionHead"><a
id="x9-1120007.5.3"></a>Using <span
class="cmtt-12">servicetype</span></h5>
<!--l. 83--><p class="noindent" >The <span
class="cmtt-12">servicetype </span>type allows the user to specify the Interface Description Language (<a
href="mainap3.html#idl">IDL</a>)
interface that is implemented by the <a
href="mainli2.html#glo:service">Service</a>. An example of an interface type is
“<span
class="cmtt-12">IDL:BULKIO/dataShort:1.0</span>” for the <span
class="cmtt-12">dataShort </span>interface in the <a
href="mainap3.html#bulkio">BulkIO</a> module. By using the
<span
class="cmtt-12">servicetype </span>type, it is possible for a system user to request that the <a
href="mainli2.html#glo:component">Component</a> in a <a
href="mainli2.html#glo:waveformapplication">Waveform</a>
be connected to any <a
href="mainli2.html#glo:service">Service</a> that can support a particular type of behavior. Normally, this
interface would not be a generic bulk data type but some specialized interface designed to support
some specific behavior.
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
href="mainch8.html" >next</a>] [<a
href="mainch6.html" >prev</a>] [<a
href="mainch6.html#tailmainch6.html" >prev-tail</a>] [<a
href="mainch7.html" >front</a>] [<a
href="main.html#mainch7.html" >up</a>] </p></div>
<!--l. 1--><p class="noindent" ><a
id="tailmainch7.html"></a>
<div class=license>
<hr>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png" /></a><br /><span xmlns:dct="http:// purl.org/dc/terms/" property="dct:title">REDHAWK Documentation</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
</div>
</body></html>