summaryrefslogtreecommitdiff
path: root/bin/FOCUS/docs/FOCUS.html
blob: ca0c85a0a289a6dd20df9ddbd5ca71513d6492bd (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!-- $Id$ -->
  <title>FOCUS</title>
</head>
<body bgcolor="#ffffff" link="#000fff" vlink="#ff0f0f" text="#000000">
<hr>
<p></p>
<h2 align="center">Feature Oriented Customizer for Middleware (FOCUS)</h2>
<h3>Table of Contents</h3>
<ul>
  <li><a href="#MOT">Introduction</a> </li>
  <li><a href="#FCS-OVR">FOCUS Options overview</a> </li>
  <li><a href="#FCS-USAGE">FOCUS Sample Usage</a> </li>
  <li><a href="#FCS-ORG">FOCUS Structure & Organization</a> </li>
  <li><a href="#FCS-ORG">Extending FOCUS</a> </li>
</ul>

<hr>
<h3><b><a name="MOT">Introduction</a></b></h3>
TAO is a highly flexible ORB that contains a wide range of ORB
configuration options. One or more of these options can be combined
to meet various application requirements, such as low-latency,
predictable real-time behavior, or small memory footprint. TAO's ORB
configuration options are managed by an object-oriented framework
within the ORB Core.  TAO ORB internally uses several objects called
<b>Resources</b>, such
as a <em>reactor</em> framework that demultiplexes new connection and
data requests from a client or <em>pluggable protocol</em> framework
to seamlessly work across different protocols.  <b>Strategies</b>, are
objects that use the <b>Resource</b> entities to perform various ORB tasks,
such as connection management, concurrency, and demultiplexing.
The <b>Service Configurator</b> is a framework that can be used
to statically and dynamically configure components into middleware and
applications.

Most often, applications that run on top of TAO use only one concrete type
of each resource. For example, predominantly TAO applications use the IIOP
protocol for communication.  In this case, the underlying framework that
realizes the feature can be specialized to remove dynamic dispatching
overheads. The Feature Oriented Customizer (FOCUS) tool provides a
generic approach to enable middleware developers to specialize middleware
Frameworks when the concrete resource type is known a priori.
FOCUS provides an XML based transformation engine, where the
specialization transformations are captured in XML file and a
weaver specializes the code. Some important points to note about FOCUS
and specialization:
<ul>
 <li>It does not modify an interface. So no application level changes are
     necessary.
 </li>
 <li>Once a framework has been customized using FOCUS for a concrete component,
     other components do not work. For example, specializing the protocol
     framework with IIOP, precludes the ability to plug-in other protocol
     implementations.
 </li>
 <li>It provides a source-to-source transformations that require re-compiling
     the source.
 </li>
</ul>

<hr>
<h3><b><a name="FCS-OVR">FOCUS Options Usage</a></b></h3>
<table border="2" cellpadding="0" cellspacing="2">
  <tbody>
    <tr>
      <th>Option</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>--prefix-path</td>
      <td>prefix-path to the ACE+TAO source distribution location. For example,
          in most situations this path is same as the ACE_ROOT environment
          variable.
       </td>
    </tr>
    <tr>
       <td>--reactor-spl <em>select-st</em>, <em>select-mt</em>, <em>tp-reactor</em></td>
       <td>Option to specialize the reactor framework with the
           concrete reactor type.
           <p>select-st: select reactor which no locking. Single threaded case.</p>
           <p>select-mt: select reactor with locking enabled, multi-threaded case.
           </p>
           <p>tp-reactor: Thread-pool reactor</p>
        </td>
     </tr>
     <tr>
        <td>--protocol-spl <em>iiop</em></td>
        <td>Option to specialize the pluggable protocol framework in TAO for the
            IIOP protocol.
     </tr>
     <tr>
        <td>--messaging-spl <em>giop</em></td>
        <td>Option to specialize the messaging strategy in TAO with GIOP
            messaging protocol.
         </td>
     </tr>
     <tr>
        <td>--wait-strategy <em>rw</em></td>
        <td>Specialize the Wait Strategy with the concrete Wait Strategy in TAO.
            This specialization corresponds to the <em>-ORBWaitStrategy</em>
            option in TAO.
         </td>
     </tr>
     <td>--output-prefix</td>
     <td>Option to copy over the specialized files to an output directory. This
         option works only when a single specialization is chose. If multiple
         specializations are chosen, then this copies the files corresponding
         to the last specialization.
     </td>
  </tbody>
</table>

<hr>
<h3><b><a name="FCS-USAGE">FOCUS Sample Usage</a></b></h3>
cmd>$ACE_ROOT/bin/FOCUS/FOCUS.pl --reactor-spl=select-st \
                                 --prefix-path=/build/arvindk/ACE_wrappers
                                 --output-prefix=/build/arvindk/spl-files

<hr>
<h3><b><a name="FCS-ORG">FOCUS Tool Organization</a></b></h3>
FOCUS tool structure is organized as follows:
<ul>
  <li>Parser directory has all parser related modules</li>
  <li>specializations: Rules data base that has the XML files required for
      performing the individual specialization transformations. For each
      specialization we have the following sub directories:
      <ul>
        <li>Reactor_Family: Specializations for ACE_Reactor family</li>
        <li>Protocol_Family: Specializations for TAO's protocol family</li>
        <li>Messaging_Strategy: Specializations for TAO's Messaging Strategy</li>
        <li>Wait_Strategy: Specializations for TAO's Wait strategies</li>
      </ul>
  </li>
</ul>

A detailed overview of the FOCUS specialization language, that specifies the
different types for specialization transformations supported in FOCUS is
discussed here: {To be updated shortly!}

<hr>
<h3><b><a name="FCS-ORG">Extending FOCUS</a></b></h3>
To add a new specializations, to FOCUS, one needs to do the following:
<ol>
 <li>Use the FOCUS specification language to model the different specialization
     Transformations required. Add this to the repository under
     FOCUS/specializations. Current convention is to use a directory for each
     family or specific type of specialization and add specialization files
     for each type in the family.
 </li>
 <li>Annotate the middleware source code where ever applicable to perform the
     transformations.
 </li>
 <li>Modify the FOCUS.pl script to add a specific option similar to --reactor-spl
     option for executing the specializations. Also update the specialization
     table that maps the command-line option to the appropriate specialization
     file within the repository.
  </li>
</ol>

<hr>

</body>
</html>