summaryrefslogtreecommitdiff
path: root/modules/CIAO/examples/Hello/ReDaC-Usage.html
blob: eb9b8c729b7b7438fcfd873720e0bccfe6d9b8fa (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!--//$Id$ -->


  
  <title>ReDaC Service Usage</title>
</head>


<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" alink="#0000ff" link="#000fff" vlink="#ff0f0f">


<hr>
<h2>Simple Tutorial for using ReDaC (<span style="font-style: italic;">Redeployment and Reconfiguration</span>)</h2>


<span style="font-weight: bold;">Prerequisite</span><b>:<br>


<br>


</b>Before you proceed further, please read the <a href="./step-by-step.html">step-by-step</a> tutorial
page first.<b><br>


<br>


</b><b>Note:</b>
<br>


<ul>


  <li>ReDaC is a middleware service provided by the <a href="http://www.cs.wustl.edu/%7Eschmidt/ACE_wrappers/TAO/CIAO/docs/releasenotes/dance.html">DAnCE</a>
framework.</li>


  <li>ReDaC service is used for redeployment and/or
reconfiguration of your&nbsp;running component-based application on
the fly without shutting down your application.&nbsp;</li>


  <li>ReDaC currently works for CIAO QoS-enabled component
middleware only.</li>


</ul>


<hr>
<h2>Example Description</h2>


We will use the Hello example to illustrate how one could use ReDaC
service to perform redeployment and reconfiguration.
<hr>
<h3>Initial Deployment</h3>


Below steps are required for the initial deployment of your application,
which is performed by DAnCE. The below steps are different from those
presented in the <a href="./step-by-step.html">step-by-step</a>
tutorial page in the sense that we pass different command line options
to the <span style="font-style: italic;">Plan_Launcher</span>
client:<br>


<ul>


  <li> Go into the <em> descriptors </em> directory
Start NodeManagers (NodeDameons) by running <code>
run_NodeDaemons.pl </code> </li>


  
  <ul>


    <li>This step is the same as the one presented in the
&nbsp;<a href="step-by-step.html">step-by-step</a>
tutorial page. </li>


  
  </ul>


  <li> Start the execution manager: <code>$CIAO_ROOT/DAnCE/ExecutionManager/Execution_Manager
-o EM.ior -i NodeManagerMap.dat </code> </li>


  
  <ul>


    <li> As one can see, we use the
"NodeManagerMap.dat" file to instruct the Execution_Manager how to find
the endpoint of each individual NodeManager (i.e., Node Daemon) where
component(s) will be deployed.</li>


  
  </ul>


  
  <ul>


    <li>This step is the same as the one presented in the
&nbsp;<a href="step-by-step.html">step-by-step</a>
tutorial page. </li>


  
  </ul>


  <li> Start the plan launcher: <code>
$CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher -p
flattened_deploymentplan_without_ns.cdp -k file://EM.ior -o DAM.ior</code>&nbsp;</li>


  
  <ul>


    <li>After this, components should be deployed
successfully. </li>


    <li>This step is different &nbsp;from the one presented
in the
&nbsp;<a href="step-by-step.html">step-by-step</a>
tutorial page in the way that we added an additional "<code>-o</code>"
option when running <code>Plan_Launcher</code>, which
dumps an IOR file of DAnCE's DomainApplicationManager. &nbsp;With
this option added, the <code>plan_launcher </code>will
exit immediately after the application is deployed, instead of staying
in the interactive mode. (As a normal user, you don't need to worry
about the details of what exactly a DomainApplicationManager is.)</li>


  
  </ul>


</ul>


<hr>
<h3>Redeployment and Reconfiguration</h3>


Basically, you could use ReDaC service in two ways. <br>


<ol style="font-weight: bold;">


  <li>Use ReDaC service <span style="font-style: italic;">directly</span>
through DAnCE's&nbsp;<span style="font-style: italic;">Plan_Launcher</span>
client</li>


  <li><span style="font-weight: bold;">Use ReDaC
service <span style="font-style: italic;">programmatically</span>
by writing your own client</span></li>


</ol>


This tutorial illustrates how exactly you could use ReDaC.<br>


<br style="font-weight: bold;">


<span style="font-weight: bold;">Use ReDaC service through
</span><span style="font-style: italic; font-weight: bold;">Plan_Launcher</span><span style="font-weight: bold;">&nbsp; of DAnCE:</span><br>


<ul>


  <li>As we've already mentioned, you should first deploy your
Hello application with DAnCE, which is described in the above "Initial
Deployment" section of this tutorial.<code> </code>
  </li>


  <li>
    
    <p> Use ReDaC service through <code>Plan_Launcher</code>'s
"-r" command line option to perform redeployment and reconfiguration.<br>


Run the command
    <code>$CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher -r
flattened_deploymentplan_without_ns_add.cdp </code>will add
additional components to the existing running assembly.</p>


  </li>


  <li>
    
    <p>Run the command
    <code>$CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher -r
flattened_deploymentplan_without_ns_remove.cdp </code>will
remove components from the existing running assembly.</p>


  </li>


  <li>Run the command
    <code></code><code>$CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher
-i file://DAM.ior</code> will tear down your entire application
completely.</li>


</ul>


<br>


<div style="margin-left: 40px;"><span style="font-weight: bold;">NOTE: &nbsp;</span>By
using ReDaC through Plan_Launcher, as a user you must provide a new
DeploymentPlan (.cdp) XML file, which captures the new deployment and
configuration settings of your application, and the Plan_UUID of the
new DeploymentPlan should be&nbsp;the same as the one of the old
(running) DeploymentPlan. Otherwise, DAnCE will think you want to
deploy a totally different deployment plan, instead of applying some
changes to the existing plan. One could use <a href="http://www.dre.vanderbilt.edu/cosmic">CoSMIC</a> MDD tool to create such a deployment plan XML file.<br>

</div>


<br>


<span style="font-weight: bold;">Use ReDaC service <span style="font-style: italic;">programmatically</span>:</span><span style="font-weight: bold;"></span>
<ul>


  
  <p> You could also use ReDaC service programmatically by writing your
own client to invoke ReDaC service. Basically, to accomplish this, your
client program needs to:</p>

  
  <ol>

    <li>Obtain the&nbsp;<code>ExecutionManager</code> object reference, either through naming service or through IOR file.</li>

    <li>Invoke the operation&nbsp;<code>perform_redeployment</code> on this interface by passing a single argument type called&nbsp;<code>DeploymentPlan</code>.</li>

  
  </ol>


</ul>


<div style="margin-left: 40px;">The IDL signature of this operation is as follows:<br>

<code><br>

&nbsp;&nbsp;&nbsp; void perform_redeployment (in DeploymentPlan new_plan)<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; raises (PlanError,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InstallationFailure,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UnknownImplId,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImplEntryPointNotFound,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InvalidConnection,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InvalidProperty,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::Components::RemoveFailure);</code><br>

</div>


<br>
<div style="margin-left: 40px;">In order to simplify the creation of a the&nbsp;<code>"new_plan", </code>we are implementing a utility class which allows a developer to easily manipulate a deployment plan data structure.</div>


<hr>
<b>Email: </b>
<address>ciao-users@cse.wustl.edu</address>


</body>
</html>