[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [COAS-List] Proposed ObservationData IDL



At 08:13 AM 9/8/99 -0700, Tim Brinson wrote:
>David Forslund wrote:
>
> > Just two comments for people to note:
> >
> > This change results in no ObservationData object when the IDL is mapped to
> > the language since it is an Any.
>
>The CompositeObservationData and AtomicObservationData replace the need 
>for the
>old ObservationData type.  If you still want that struct just create it 
>and call
>it something like SiameseObservationData (since it has two heads :-).
>
>The structs in the proposal I made are for discussion purposes.  If you 
>want the
>old do everything struct you can still have it.  The reason it was needed 
>before
>is because it was bound to the operations and structs don't have inheritance.
>When the return type is an Any it allows you to use a more natural mapping of
>composite and atomic observations to their own types (as they are in the
>information model).  This is good!
>
>Notice the ObservationQualifier type is still a typedef of 
>ObservationData.  In
>the structs that type is spelled out explicitly for the qualifier fields 
>(since
>we get out of the self referential limitations of the struct).
>
>My main concern is the return type on the operations should be an Any.  I am
>very flexible on the set of observation data structs to be defined for COAS
>1.0.  The ones I sent before were just a proposal to get some 
>discussion.  There
>were a minimal number that provided full flexibility but also efficiency for
>simple atomic observations.  It also gave flexibility to define special
>observations in localized environements that can be much more efficient 
>and the
>flexibility to use other ORB defined types in the future (such as ValueTypes,
>a.k.a. Objects By Value).

The CompositeObservationData ends up looking like:

    String code;
    Any[] qualifiers;
    Any[] composit;
     Any[] value;

With all of this passed back in an Any.  This seems a little like overkill 
to me.
I like the idea of using the Any so that the return data is extensible, but 
the above seems
a little overkill.



>Do you have any suggested observations structs for COAS 1.0?  Are you 
>suggesting
>to add a SiameseObservationData (or call it what you will) to the ones I
>proposed?  Or to replace them?  Something like:
>
>     struct SiameseObservationData {
>         QualifiedCodeStr code;
>         sequence<SiameseObservationData> composite;
>         sequence<SiameseObservationData> qualifiers;
>         sequence<any,1> value;
>     };

This latter suggestion would preserve the structure in the existing 
ObservationData (but with
an obvious need for an improved name :-).
The same might apply to your SimpleObservationData examples.


> > Second, I thought the submitters were concerned about the performance of
> > Any which is why they only used it
> > for the ObservationValue so that all navigation could be done with the
> > struct.  With this proposal, everything is coming across the wire as an 
> Any.
>
>Has anyone done a comparison?  In one case you are describing the 
>structure with
>a TypeCode and the other you are describing the structure using
>SiameseObservationData.  I can find examples where one is more efficient than
>the other and vice versa.

Chuck Carman has made the comment that in visibroker the expense of 
unmarshalling an Any
was very large.  We've seen no obvious penalty from it or from Structs.

Dave


> > These are just issues to think about.
>
>Thanks for bringing them up.
>
>
>Tim
>
>
>
>
>
> > >         typedef any ObservationData;
> > >         // This is the type bound to the operations.
> > >         // COAS 1.0 ObservationData can only be one of the 3 structs
> > >defined below.
> > >
> > >
> > >         struct CompositeObservationData {
> > >                 QualifiedCodeStr code;
> > >                 sequence<ObservationData> composite;
> > >                 sequence<ObservationQualifier> qualifiers;
> > >         };
> > >
> > >         struct AtomicObservationData {
> > >                 QualifiedCodeStr code;
> > >                 any value;
> > >                 sequence<ObservationQualifier> qualifiers;
> > >         };
> > >
> > >         struct SimpleObservationData {
> > >                 QualifiedCodeStr code;
> > >                 any value;
> > >                 ObservedSubjectId observed_subject;
> > >                 TimeSpan time_span;
> > >         };
> > >