summaryrefslogtreecommitdiff
path: root/TAO/docs/releasenotes/OBV.html
blob: 2878175f439bf42be8ac9af7e11bcf3c84b94f4d (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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<body text="#000000" bgcolor="#FFFFFF">

    <head>
      <title>Object-by-Value status</title>
      <!-- $Id$ -->
    </head>

    <body>
      <center>
        <h1><a name="orb"></a>Objects-by-Value</h1>
        Points of contact: <a href="mailto: parsons@cs.wustl.edu">Jeff Parsons</a>
        <a href="mailto: bosk@ipmce.ru">Boris Kolpackov</a>
        <a href="mailto:g.edwards@vanderbilt.edu">George Edwards</a>

        <p>Last Update: 2003/06/30 </p>
      </center>

      <p>Objects-by-Value (OBV) describes the new type, <CODE>valuetype</CODE>, introduced in CORBA 2.3
        <br>(Core:
        <a href="http://www.omg.org/cgi-bin/apps/doc?formal/02-12-06.pdf">formal/02-12-06.pdf</a>; Mapping to C++:
        <a href="http://www.omg.org/cgi-bin/apps/doc?formal/03-06-03.pdf">formal/03-06-03.pdf</a>).
       <p>The original TAO implementation was contributed by
        <a href="mailto: kuepper2@uni-wuppertal.de">Torsten Kuepper</a>, and has subsequently been enhanced and corrected by <a href="mailto: parsons@cs.wustl.edu">Jeff Parsons</a> and <a href="mailto:g.edwards@vanderbilt.edu">George Edwards</a>.
      <p><CODE>Valuetype</CODE>s are similar to IDL <CODE>struct</CODE>s extended with 
        these capabilities:
      <ul>
        <li><p>Encapsulate both state information and operations in an implementation that is guaranteed to be local.</p>
        </li>

        <li><p>Can be declared <CODE>abstract</CODE>, in which case no state members are defined.</p> 
        </li>
<li><p>Can inherit from a single concrete <CODE>valuetype</CODE> and multiple <CODE>abstract valuetype</CODE>s.</p></li>
<li><p>Can support a single concrete <CODE>interface</CODE>, allowing them to be manipulated as either a valuetype or an object reference.</p></li>
<li><p>Can support multiple <CODE>abstract interface</CODE>s, allowing them to be substituted for those interfaces in operation invocations.</p></li>
        <li><p>Can hold references to other <CODE>valuetype</CODE>s, with the
            possibility of NULL references or shared (aliased) references.</p>
        </li>
      </ul>

<p>Valuetypes have the following uses:
<UL>
<li><p>Implement abstract datatypes (ADTs) that can be copied to another process.</p></li>
<li><p>Represent <CODE>eventtype</CODE>s in the Event Service.</p></li>
<li><p>Ensure operations are executed locally for increased performance.</p></li>
</UL>
      <a name="current"><h3>Current status:</h3></a>

      <ul>
        <li><p>The IDL compiler understands <CODE>valuetype</CODE>. 
        Relevant options of TAO's IDL compiler are: <P>
            <UL>
            <LI>-Gv Enable OBV support (default)
            <LI>-Sv Disable OBV support
            <LI>-Wb,obv_opt_accessor Make accessor and modifier functions inline.
            Overriding them is not allowed in this mode.
            </UL>
          <p><CODE>libTAO</CODE> must be compiled with <CODE>TAO_HAS_VALUETYPE</CODE>.</p>
        </li>
        <li><p><CODE>Valuetype</CODE>s can be used as arguments in CORBA invocations.
            There is an example in
            <A HREF="../../examples/OBV/Typed_Events">$TAO_ROOT/TAO/examples/OBV/Typed_Events</A>.
            <CODE>Valuetype</CODE>s can reference other
            <CODE>valuetype</CODE> objects (but without sharing).
          </p>
        </li>
        <li>
          <p>Support for valuetypes as members of IDL aggregate types has been
              added.</p>
        </li>
        <li>
          <p>Support for inheritance from a concrete interface (<CODE>supports</CODE>) has been added. There is an example in <A HREF="../../tests/OBV/Supports">$TAO_ROOT/TAO/tests/OBV/Supports</A>.</p>
        </li>
<li>
<p>Support for inheritance from abstract interfaces has been added. There is an example in <A HREF="../../tests/Abstract_Interface">$TAO_ROOT/TAO/tests/Abstract_Interface</A>.</p>
        <li>
          <p>Support for forward declared valuetypes defined in another compilation
              unit has been added. See <A HREF="../../examples/OBV/Typed_Events">$TAO_ROOT/TAO/examples/OBV/Typed_Events</A>.</p>
        </li>
<li>
<p>Support for recursively-defined valuetypes has been added. See <A HREF="../../tests/OBV/Supports">$TAO_ROOT/TAO/tests/OBV/Supports</A>.</p>
</li>
<li>
<p>Support for user-declared factories has been added. See <A HREF="../../tests/OBV/Factory">$TAO_ROOT/TAO/tests/OBV/Factory</A>.</p>
</li>
      </ul>

      <a name="issues"><h3>Known issues:</h3></a>

      <ul>
        <li><p><CODE>Valuetype</CODE>s work only in conjunction with
            compiled marshaling (<CODE>-Gc</CODE>, currently default for
            <CODE>tao_idl</CODE>). 
          </p>
        </li>

        <li><p>No support for sharing (aliasing).
          </p>
        </li>

        <li><p>No support for <CODE>valuebox</CODE>es
          </p>
        </li>
<li>
<p>
No support for <CODE>valuetype</CODE>s with cyclic references.</p></li>

        <li><p>No support for fragmentation (chunking) of the marshalled
            <CODE>valuetype</CODE> object. Hence no support for truncation or
            custom marshalling.</p>
        </li>

        <li><p>The marshal engine accesses the state members directly and
            does not utilize the accessor/modifier functions. This is different
            from the CORBA specs and needs to be changed. But the
            optimized mode  (<CODE>-Wb,obv_opt_accessor</CODE>) should be
            unaffected by that.
          </p>
        </li>

        <li><p>The map of <CODE>valuetype</CODE> factories needs some
            revision to provide proper locking. Currently the
            registration of factories is best completed before
            unmarshalling <CODE>valuetype</CODE>s.
            There is one map of factories for the whole process. This
            will once be changed to conform to the specs, which
            suggests one per ORB.
          </p>
        </li>
      </ul>

      <P><HR><P>
      <a href="#toc">Back to TOC</a>
    </body>
</html>