Title: Tagged Data Facility
1Tagged Data Facility
ORBOS Meeting - November 1998, Burlingame
Oliver Simsolivers_at_cix.co.uk
orbos/98-10-12
2Submitters
- Systems Software Associates, Inc.Supported by
- Micro Focus
- NIIIP Consortium
- OSM
3Agenda
- RFP Requirements
- Feedback from ORBOS at Seattle
- Revised Submission (orbos/98-10-06)
- Mandatory Requirements
- Concepts
- IDL
- Optional Requirements
4RFP Objective
- Specification for a general-purpose tagged data
structure facility - handles arbitrary items of data of in-memory size
- each data value tagged for identification
- built and parsed dynamically
- provides for nesting
- passed by value
- Interfaces and/or mechanisms that
- provide a standard way of creating, accessing,
updating and manipulating tagged data constructs
OMG documents orbos/97-12-26 (RFP)
orbos/98-02-18 (Errata)
5RFP Problem Statement
- Common requirement with proprietary solutions
- under-the-covers use of current specifications
- use of dictionary language constructs
- Need for standard solution for interoperability
- standard interface, not a standard internal
structure - Need not addressed by current specifications
- although some provide a subset
6RFP Scope
- Interfaces and mechanisms only
- although tags intended to be meaningful, excludes
lexicon or repository - Excludes bulk file transfer
- in-memory sized data clump
- Local (pass copy by value)
7RFP Mandatory Requirements (1)
- General requirement
- Interfaces and/or mechanisms that realize
tagged data capsules that hold tagged data
items. - Each tagged data item includes at least a tag and
an associated value. - Nesting
- Access to any nested value with single operation,
given top-most item - General capabilities
- Multiple values per tag - set/get whole set or
individual value - Locate / retrieve data value given a tag
- Create, destroy, insert, update, copy, move
- A valuetype (pass by value type)
8RFP Mandatory Requirements (2)
- Sequence insensitivity of items in capsule
- Value can be any kind of in-memory size data
- specify how type (of data value) issues managed
- Type conversion of base Corba types on get from
tagged data item - Tagged data item to hold nested items as well as
tag and data - Stringification
9RFP Optional Requirements
- Tag Repository
- use of the Meta-Object Facility
- Tag Differentiation
- mechanism only
- Name-spacing (homonym handling)e.g. Order
(customer order) vs. Order (sequence) - Synonym handlinge.g. Comment and Remark.
- without changing implementation code
- separate from item/capsule manipulation interfaces
10RFP Issues to be Discussed
- Issues of computational efficiency
- How the tagged data concept relates to concepts
in the MOF and in the OAD domain. - Relationship, if any, between proposals and
Corba context objects and Properties - Default handling of single value get when tagged
data item has multiple values - Limits to nesting levels
11RFP Evaluation Criteria
- Level of simplicity of interfaces and mechanisms
- Implied or explicit performance optimization
capability - Ability to handle, or be expanded to handle,
synonyms and homonyms.
12Agenda
- RFP Requirements
- Feedback from ORBOS at Seattle
- Revised Submission (orbos/98-10-06)
- Mandatory Requirements
- Concepts
- IDL
- Optional Requirements
13Feedback from ORBOS at Seattle
- Rename to Tagged Data Facility
- Make path separator same as is proposed for
Interoperable Name Service - Use union of data sequence definitions, not anys
- Add text supporting subset of base Corba types
- Remove Fixed type (its broken)
- Specify how wstring type is stringified
- Rename array to seq
14Agenda
- RFP Requirements
- Feedback from ORBOS at Seattle
- Revised Submission (orbos/98-10-06)
- Mandatory Requirements
- Concepts
- IDL
- Optional Requirements
15Tagged Data Object (TDO)
- TDO is both tagged data capsule and tagged
data item
typedef sequence TdoSeq typedef string
Tagvaluetype tdo private Tag t private
DataValueSeq data_array private
TdoSeq children ...
16TDO Data Value
typedef sequence StringSeq typedef
sequence TypeSeq enum TdoDataType STRI
NG_T, TYPE_T, union DataValue switch
(TdoDataType) case STRING_T string
aString case Type_T type aType union
DataValueSeq switch(TdoDataType) case
STRING_T StringSeq aStringSeq case Type_T
typeSeq aType
Enum TdoDataType BOOLEAN_T, BIN_T, DOUBLE_
T, LONG_T, OBJECT_T, STRING_T, WSTRING_T, EMP
TY_T
Nothing
17TDO attributes
Tag
Codes
t
StringArray
DataValueSeq
data_array
8AH 2JD ...
TDOs
Address
8AH 2JD
TdoSeq
Address
children
String
8AH 2JD
Address
String
8AH 2JD
String
18Nested TDOs
19Terminology
CustInfo
Address
Name
Codes position 0
Codes position 1
Street
City
State
Parent Address is the parent of
City. Child Name, Address and both Codes are
children of CustInfo Street, City, State are
children of Address. Descendant City is a
descendant of CustInfo. Ancestor CustInfo is an
ancestor of City. Twin Codes (position 1) is a
twin of Codes (position 2). Root A TDO that has
no parent. Child Container The logical space for
any children of a given parent.
20Operations
- Create, Delete TDO
- Get/Set Tag, DataArray, Data Array Element
- Attach/Detach TDO
- Query and Count
- Get reference to TDO, includes iteration
capability - Copy Stringify stringify to/from XML format
- Typed operations Create-and-attach, Get data
element (with type coercion), Set data element - Single Operation all of the above except Copy,
Stringify
21Single operation by Path
- RFP Any operation on a single tagged data item
shall be achieved with a single operation,
regardless of depth of nesting. - Path is Address/City
- city my_tdo.get_element_at( Address/City, 0
)
my_tdo
Wanted
22Implicit TDO Creation
- Create/set by Path can create intermediate TDOs.
E.g. - my_tdo.create_tdo_at( 17000 West
Lakes,Address/Street)
my_tdo
23TagManager interface
Interface TagManager Tag register_tag( in
string tag_name) raises ( BadTagName
) string get_tag_name( in Tag t
) Path make_path( in string path_spec
) raises ( BadPath )
- Validates tag_name and path_spec formats
- Provides for computational efficiencies by
implementers - Base for future expansion
- synonym/homonym handling
- federation
- Tag constraints 10-9, _ (underscore)
24Tdo Operations Create
valuetypeTdo // - Constructor (for root
TDO) init ( ) init ( in Tag t, in
DataValueSeq data_array ) // - New Child TDO
Tdo create_child_before ( in Tag t, in
DataValueSeq data_array, in Tdo child )
raises (NotChild ) Tdo create_child_after
( in Tag t, in DataValueSeq data_array, in Tdo
child ) raises (NotChild ) // - in the
container of a descendant Tdo create_tdo_at (
in DataValueSeq data_array, in Path p )
raises ( BadPosition )
25Tdo Operations Get/Set
// Tag operations Tag get_tag () void
set_tag ( in Tag t ) // Get Data (entire
array) DataValueSeq get_array
() DataValueSeq get_array_at ( in Path p )
raises ( NoTdo ) // Get Data (one element from
array) DataValue get_element ( in short index
) raises ( BadIndex ) DataValue
get_element_at ( in Path p, in short index )
raises ( BadIndex, NoTdo ) // Set data (entire
array) void set_array ( in DataValueSeq data
) void set_array_at ( in DataValueSeq data, in
Path p) raises (BadPosition) // Set Data (one
element in the array) void set_element ( in
DataValue data_element, in short index )
raises (BadIndex, TypeConflict) void
set_element_at ( in DataValue data_element, in
Path p, in short index ) raises (BadIndex,
BadPosition, TypeConflict )
26TDO Operations Attach/Detach
// Attach TDO into container of this TDO void
attach_child ( in Tdo new_child ) raises (
NotRoot ) void attach_child_before ( in Tdo
new_child, in Tdo child ) raises ( NotRoot, NoTdo
) void attach_child_after ( in Tdo new_child,
in Tdo child ) raises ( NotRoot, NoTdo ) //
Attach TDO into container of a descendant void
attach_child_at ( in Path p, in Tdo new_child )
raises ( BadPosition, NotRoot ) // Detach this
TDO Tdo detach ( ) raises ( NotChild ) //
Detach TDO from the container of this TDO Tdo
detach_child ( in Tdo child ) raises ( NoTdo
) // Detach a specified TDO Tdo
detach_tdo_at ( in Path p ) raises ( NoTdo )
27TDO Operations Query, Count, get Ref
// Query operations on this TDO boolean
has_child ( in Tag t, in short position
) boolean is_root () // Query operations on
a descendant boolean is_tdo_at ( in Path p
) // Counting operations on this
TDO short get_child_count ( in Tag t
) short get_array_size () // Get TDO
Reference to a child of this TDO Tdo
get_child ( in Tag t, in short position ) raises
( NoTdo ) // Get TDO Reference to a
descendant Tdo get_tdo_at ( in Path p )
raises ( NoTdo ) Tdo get_nested_tdo ( in
Tag t, in Tdo start ) // Get TDO Reference for
iteration/traversal through container of this
TDO Tdo get_tdo_before ( in Tag t, in Tdo
child ) Tdo get_tdo_after ( in Tag t, in
Tdo child )
28TDO Operations Copy, String, Delete
// Copy this TDO Tdo copy () // -
transfer another TDOs data array to this
TDO void set_value_from (in Tdo source)
raises (NoTdo) // Stringify this TDO Tdo
from_string ( in string stringified_tdo )
raises ( BadSyntax ) string to_string () //
Delete this TDO void delete() // Delete a
child TDO void delete_child( in Tag t, in
short position ) raises (NoTdo) // Delete a
descendant TDO void delete_tdo_at ( in Path p
) raises (NoTdo)
29String form well-formed XML
my_tdo
CustInfo (empty) Name John S.
Jones Address 20154 (long) Street 17000
West Lakes City Taylorville
State Colorado SalesInfo (empty) Codes 5
,1,3 (long)
John S. Jones typelong 20154 17000 West Lakes
Taylorville
Colorado fo typeempty/ count3 5 1 3
string_tdo my_tdo.to_string()
30TDO Operations Typed APIs
// - Create descendant TDO with single-value
array Tdo create_string_tdo_at ( in string
data, in Path p ) raises ( BadPosition, NotChild
) Tdo create_type_tdo_at ( in type data, in
Path p ) raises ( BadPosition, NotChild
) // - Type-coercing operations // -- Get
one element from descendant TDO's data array
string get_as_string_at ( in Path p, in short
index ) raises ( NoCoercion, BadIndex,
NoTdo) type get_as_type_at ( in Path p,
in short index ) raises ( NoCoercion, BadIndex,
NoTdo) // -- Set one element in the array of a
descendant TDO void set_string_at ( in string
data, in Path p, in short index ) raises (
BadIndex, NoCoercion ) void set_type_at (
in type data, in Path p, in short index ) raises
( BadIndex, NoCoercion )
31TDO ordering
- TDO ordering is specified by TDO operation
semantics. Implementations shall observe this
ordering.
20154 17000 West
Lakes Taylorville
Colorado
USA John S.
Jones 5,1,3
5,1,3 John
S. Jones 20154 17000
West Lakes USA
Taylorville
Colorado
- In normal use, only twin TDO order is
semantically significant.
32Meeting Requirements
- All mandatory requirements met.
- Structure of TDO defined by OBV
- structure not known when RFP issued
- IDL not yet validated by OBV-compatible compiler
33Agenda
- RFP Requirements
- Feedback from ORBOS at Seattle
- Revised Submission (orbos/98-10-06)
- Mandatory Requirements
- Concepts
- IDL
- Optional Requirements
34Tag differentiation
- Tag Repository
- No proposals made.
- Tag Differentiation
- Reminder
- Homonym wind (gale) vs. wind (bend)
- Synonym buy and purchase
- Tag Manager interface proposed
- Enables homonyms / synonyms to be handled outside
users code(how this is done is an
implementation detail)
35Tagged Data Facility
ORBOS Meeting - November 1998, Burlingame
Oliver Simsolivers_at_cix.co.uk
orbos/98-10-12
36Use Cases (1 of 2)
- Electronic Commerce
- a Trade, passed around among several different
users (firms) - a user may not know about all the data
- change
- EDI
- standard way of handling an EDI packet
- not all handlers know all the content
- change
- Configuration
- single standard parser
- change
37Use Cases (2 of 2)
- DB data handling
- read, then pass around (e.g. to PCs, etc.)
- Generic implementations
- presenting data on GUI
- event data handling
- mapping object types to DB columns
- etc.
- Remote get/set performance
- Externalization