diff options
Diffstat (limited to 'TAO/CIAO/DAnCE/examples/Quoter/README.html')
-rw-r--r-- | TAO/CIAO/DAnCE/examples/Quoter/README.html | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/TAO/CIAO/DAnCE/examples/Quoter/README.html b/TAO/CIAO/DAnCE/examples/Quoter/README.html new file mode 100644 index 00000000000..e841ffa57da --- /dev/null +++ b/TAO/CIAO/DAnCE/examples/Quoter/README.html @@ -0,0 +1,171 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<!--//$Id$ --> +</head> +<body> +<b><font size="5">Quoter example README</font></b> +<p>To download the source codes of this example please refer to the CVS +repository at <code>$CIAO_ROOT/DAnCE/examples/Quoter</code>. +</p> +<hr> +<h2>Example Description</h2> +<div align="left"> +<font face="Times New Roman" size="3">The <b>StockDistributor</b> +component would be monitoring a real-time stock database. When the +values of particular stocks change, it pushes a CCM <b>eventtype</b> +that contains the stock's name via a CCM event source to the +corresponding CCM </font> +</div> +<div align="left"> +<font face="Times New Roman" size="3">event sink implemented by one or +more <b>StockBroker</b> components. If these components are interested +in the stock they can obtain more information about it by invoking a +request/response operation via their CCM receptacle on a CCM facet +exported by the <b>StockDistributor</b> component. The diagram of this +example is shown in fig 1.</font> +</div> +<p align="center"><img alt="" src="images/quoter.jpg" + style="width: 362px; height: 212px;"><br> +figure 1<br> +</p> +<h2 align="justify"><span style="font-weight: 400;"><font size="3"></font></span><span + style="font-weight: 400;"><font size="3">This example +is based on a series of </font> <a + href="http://www.cs.wustl.edu/%7Eschmidt/report-doc.html"><font + size="3">CORBA Component Model</font></a><font size="3"> columns +written by <a href="http://www.cs.wustl.edu/%7EEschmidt/">Douglas +Schmidt</a> and <a href="http://www.iona.com/hyplan/vinoski/">Steve +Vinoskiand</a>, and has been consistently used as a example for <a + href="http://www.cs.wustl.edu/%7EEschmidt/TAO.html">TAO</a>. Please +refer to <a + href="http://www.cs.wustl.edu/%7Eschmidt/ACE_wrappers/TAO/docs/tutorials/Quoter/">TAO +online tutorial</a> for details. <br> +</font></span></h2> +<h2>The files you will find</h2> +<li>The interfaces, data types and exceptions used by the components of +this +application are specified in the <a href="Stock_Base/Stock_Base.idl"><code>Stock_Base.idl</code></a> +file, placed +in this example root directory ($CIAO_ROOT/examples/Quoter/Stock_Base). +The lib +generated +from Stock_Base.idl is linked to all the components of this example.</li> +<li> mpc files for each of the components are available in the +components +directories. We use the <a + href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> +to +generate makefiles and Visual C++ project/solutions files for all <a + href="http://www.cs.wustl.edu/%7Eschmidt/ACE.html">ACE</a>, <a + href="http://www.cs.wustl.edu/%7Eschmidt/TAO.html">TAO</a> and <a + href="http://www.cs.wustl.edu/%7Eschmidt/CIAO.html">CIAO</a> +libraries. </li> +<li> idl and cidl files for each component are placed in +components directory. +</li> +<li> The <code>_exec.h</code> and <code>_exec.cpp</code> files +are the actual +implementation of the components.</li> +<hr> +<h3><font size="5">Make</font></h3> +Navigate to the directory <code>$CIAO_ROOT/DAnCE/examples/Quoter</code> +and do:<br> +<code>$ACE_ROOT/bin/mwc.pl</code> (use -type option if you are using +a +compiler/IDE other than gnuace -which by default generates GNU +makefiles) <br> +For example, use <code>%ACE_ROOT%/bin/mwc.pl -type vc71</code> if you +are using +Visual C++ 7.1 IDE.<br> +<br> +Then build/make the generated project/make files. Correct errors in the +source codes if necessary.<br> +<hr> +<h3><font size="5">Assemble</font></h3> +<p>Now we can step forward to build the assembly. </p> +<li>In the descriptor subdirectory, you'll find a XML descriptor file +that +describes your <em>deployment plan</em>, the +flattened_deploymentplan.cdp. This file declaratively specifies how the +component assembly is +constructed. +Specifically, it defines the component types, component instances, +component +connections and implementation artifact descriptions. <br> +</li> +<dd> + <li>Please make sure that the Modified_Deployment.xsd and XMI.xsd +files +are in the Display/descriptors directory. The former file could be +found in $CIAO_ROOT/docs/schema +directory. <br> + <br> +Note: Creating the deployment plan descriptor is a tedious and +error-prone job, +you can download <a href="http://www.dre.vanderbilt.edu/cosmic">CoSMIC</a> +to +assist you in this step. + <p> </p> + <hr></li> +</dd> +<h2>Running the program </h2> +>From different shells in <code>$CIAO_ROOT/DAnCE/examples/Quoter/descriptors/</code> +directory: +<ul> + <li>Start NodeManagers (NodeDameon) by running runNodeDaemon.pl </li> + <li>Start the execution manager +$CIAO_ROOT/DAnCE/ExecutionManager/Execution_Manager -o ior -i +Stock.dat </li> +</ul> +<p>The Stock.dat file describes the deployment daemons CIAO's +Execution_Manager +will contact to instantiate ComponentServer's, home's, and component +instances. +Each line specify the name of a installation "destination" and the +corresponding corbaloc IOR for the CIAO_Daemon.</p> +<ul type="square"> + <li><em>NOTE</em>: As one can see, we use the "Stock.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, so this is non-standard. We plan to use Naming Service to do +this in the future. </li> +</ul> +<ul> + <li> Start the plan_launcher by running +$CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher -p +flattened_deploymentplan.cdp -k file://ior</li> + <li>By now the components should be successfully deployed. You may +run the driver program to start the application. Open a new shell, keep +in the /Quoter/descriptors directory, and try the following +commands, see what happens in the component server<br> + </li> +</ul> + <br> + Start the distributor +service at a frequency of 3 hertz:<br> + <span style="color: rgb(51, 102, 255);">../Distributor/Distributor.exe +-o -r3</span><br> +<br> + Use the broker program to +subscribe to MSFT stock<br> + <span + style="color: rgb(51, 102, 255);">../Broker/Broker.exe -s MSFT</span><br> +<br> + Subscribe to IBM stock<br> + <span + style="color: rgb(51, 102, 255);">../Broker/Broker.exe -s IBM</span><br> +<br> + Unsubscribe to MSFT stock<br> + <span + style="color: rgb(51, 102, 255);">../Broker/Broker -u MSFT</span><br> +<br> + Turn off the distribution +service:<br> + <span + style="color: rgb(51, 102, 255);">../Distributor/Distributor -f </span><br> +<br> +Please contact mxiong@dre.vanderbilt.edu if you have any questions. + <br> +</body> +</html> |