summaryrefslogtreecommitdiff
path: root/CIAO/docs/tutorials/CoSMIC/03.html
blob: c2da3726762ccc04eed89d6dc463f02528cecb0f (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

  <title>Building a Stock Quoter with TAO - A Tutorial</title>
  <!-- $Id$ -->
</head>

<body style=
"color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" link=
"#000FFF" vlink="#FF0F0F">
  <h3>Implementing Quoter Components with DAnCE<br /></h3>We
  discuss this section after the PICML modeling only because we
  would like to focus our attention more on the modeling stage. It
  does not indicate that the implementation of components has to be
  subsequent to the work we've done under GME. They are totally
  orthogonal to each other. In fact, they are so orthogonal&nbsp;
  that we won't go into details as to how DAnCE programming should
  be done. We'll briefly go through the functionality of each
  component and provides the links to their implementations
  respectively. For a hands on experience on DAnCE programming,
  please refer to $CIAO_ROOT/examples/Hello.<br />
  <br />
  <big><big><small>Broker Component<br />
  &nbsp;&nbsp;&nbsp;</small></big></big> The Broker component
  waits to be notified by the Distributor component about stock
  changes. When a stock change event arrives,&nbsp; it will go back
  to Distributor component and retrieve the information it interest
  in and output them to the console. The users are allowed to
  subscribe to the interested stock value through the interface
  supported by Broker component. Here's the complete version of
  <a href="../Quoter/Simple/Broker/Broker_exec.h">Broker_exec.h</a>
  and <a href=
  "../Quoter/Simple/Broker/Broker_exec.cpp">Broker_exec.cpp</a>.<br />

  <br />
  <big><big><small>Distributor Component<br />
  &nbsp;&nbsp;</small></big></big> The Distributor component
  monitors the real time stock database and publishes events
  whenever it detects stock change. In our program, we use a
  ACE_Task&nbsp; to simulate this real-life activity. The task
  will run in a separate thread and periodically increment the
  stock value by 1. In the same time the stock value is
  incremented, an <span style=
  "font-style: italic;">StockName</span> event along with the name
  of the changed stock will be sent. Here's the complete version of
  <a href=
  "../Quoter/Simple/Distributor/Distributor_exec.h">Distributor_exec.h</a>
  and <a href=
  "../Quoter/Simple/Distributor/Distributor_exec.cpp">Distributor_exec.cpp</a><br />

  <big><big><small><br />
  Broker client<br />
  &nbsp;&nbsp;&nbsp;</small></big></big> The Broker client program
  is the driver program for client to control Broker component,
  subscribe and unsubscribe to a specific stock. Here's the
  complete version of <a href=
  "../Quoter/Simple/Broker/Broker.cpp">Broker.cpp</a><br />
  <br /><big><big><small>
  Distributor client</small></big></big><br />
  &nbsp;&nbsp;&nbsp;&nbsp; The Distributor
  client program is the driver program for client to control
  Distributor component, turn on and off the distribution service,
  set up the frequency, etc. Here's the complete version of
  <a href="../Quoter/Simple/Distributor/Distributor.cpp">Distributor.cpp</a>
  <a name="2" /><br />
  <br /><br />


  <address>
    <a href="mailto:ming.xiong@vanderbilt.edu">Ming Xiong<br /></a>
  </address><!-- Created: Sat Nov 27 15:25:06 CST 1999 -->
  <!-- hhmts start -->
  <a href="mailto:ming.xiong@vanderbilt.edu">Last modified: 
  <!-- hhmts end --></a>
</body>
</html>