~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/CIAO/docs/tutorial/Hello/README

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// README,v 1.1 2003/12/17 00:30:50 lut Exp
2
 
 
3
 
This example showcases a component implementation in its simplest
4
 
form.  The utmost purpose of this example is to demonstrate how easy
5
 
it is to implement a component and a system using CCM and to provide
6
 
ourselves an example implementation of how the CCIDL generated code
7
 
should look like.
8
 
 
9
 
To implement a component, all you need to do is to define the
10
 
component, as in hello.idl.  Then you have to define some aspects of
11
 
the component implementations using the CIDL definition, as we do here
12
 
with hello.cidl.  And finally, the component implementor implement the
13
 
component and home executors according to the executor mapping.
14
 
 
15
 
 
16
 
User Defined    Notes
17
 
Files
18
 
---------       ---------------------------------------
19
 
hello.idl       Component and Home IDL definitions.
20
 
 
21
 
hello.cidl      Component and Home implementation definitions.
22
 
 
23
 
hello_exec      Executor implementations.
24
 
 
25
 
 
26
 
We also generate 3 libraries and 2 executables in this example.  They
27
 
may look perplexing at the first glance, but when we have full CCM
28
 
support, all but one library and one executable will need to be
29
 
generated manually.  The rest should be generated thru the tools provided by CIAO.
30
 
Below is the list of libraries and executable in this example:
31
 
 
32
 
Files           Notes
33
 
---------       ---------------------------------------
34
 
hello_stub      A library contains the client stub implementation.
35
 
                Client programs can link to this library instead of including
36
 
                the stub implementation directly in the executable.  The real
37
 
                purpose of putting the stub code in a separate library is
38
 
                to avoid code duplication when various interdependent components
39
 
                are installed into one component server (where they will need to
40
 
                interact with other components using the collocation code in the
41
 
                stub library.)
42
 
 
43
 
hello_svant     This library contains the server side skeletons and CIDL generated
44
 
                (currently handcrafted) servant implementation for the component
45
 
                and home defined in CIDL.
46
 
 
47
 
server          This is a minimalist's implementaion of a simple "generic server".
48
 
                We should be able to generalize the example into a "component server"
49
 
                in CIAO which will support component deployment and server configuration
50
 
                thru some property files.
51
 
 
52
 
client          A simple client program that access the component.
53
 
 
54
 
hello_exec      This library contains the CIDL generated executor definitions and the
55
 
                actual component and home implementations (business logic.)  It it not
56
 
                clear to me whether we should package this file together with hello_servants
57
 
                library as most of the stuff included in these libraries are generated
58
 
                by CIDL compiler.  We will see in the future.
59
 
 
60
 
 
61
 
** Here's a more detailed break down of the process.
62
 
 
63
 
1. Define the component, as in hello.idl which defines the client-view
64
 
   of the component.  This view is equivalent to the interfaces
65
 
   defined in helloC.idl (for component unawared client.)
66
 
 
67
 
2. Define how the component should be implemented, as in hello.cidl.
68
 
   CIDL compiler should generate the executor definitions as in
69
 
   helloE.idl.
70
 
 
71
 
3. CIDL also generate the component-specific skeleton (container?)
72
 
   implementations as in HelloSkel.xxx.  These skeleton
73
 
   implementations determine how the component should be activated,
74
 
   how to manage the servant lifecycle, their OID and such.
75
 
 
76
 
4. If a component implementation needs to support more advanced
77
 
   features, such as transactional behavior, the developer needs to
78
 
   "extend" the executor definitions by inheriting from other
79
 
   components callback interfaces, such as SessionSynchronization.
80
 
   We don't have an example here because we want to keep this example
81
 
   as simple as possible.
82
 
 
83
 
5. Component executors are implemention by implementing the desired
84
 
   executor definition.
85
 
 
86
 
6. Packaging and deploying the component....  This example only shows
87
 
   how to deploy a single component implementation.  The servant
88
 
   skeletons can either be packaged with the component implementation
89
 
   in a single DLL, or be packaged in a separate DLL which, in turn,
90
 
   can be deployed with the component implementation together as an
91
 
   assembly, or be put in some sort of repository.
92
 
 
93
 
 
94
 
How to Run:
95
 
----------
96
 
 
97
 
Run with
98
 
 
99
 
  run_test.pl to start the test using CIAO_Daemon and ComponentServer
100
 
 
101
 
or
102
 
 
103
 
  run_simple_test.pl to start the test using Simple_Component_Server
104
 
  Note: I am having trouble with the simple component server. 
 
 
b'\\ No newline at end of file'