3.1.1 Abstract Data Model

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

The Remoting Data Model represents higher-layer-defined data structures and values as directed edge-labeled graphs of nodes. Also, the Remoting Data Model can represent a Remote Method invocation and the Return Value or error information from the invocation. Providing a mapping to any specific programming language is beyond the scope of this document. Section 2.2.5 contains an informal notation to describe the Remoting Data Model.

Mapping to Binary Format (section 3.1.5.1) provides a mapping to binary format structures from the Remoting Data Model. Mapping RDM to SOAP Format (section 3.1.5.2) provides a mapping between the Remoting Data Model and the SOAP Data Model.

Remoting Type

A Remoting Type defines the structure of data. Class, Array, Enum, Primitive Type, Server Interface, and Server Type are different kinds of Remoting Types. Remoting Types are contained in a Library. All Remoting Types are identified by a name that is unique when qualified with the name of the containing Library. Remoting Type names are case sensitive. A Remoting Type name consists of a namespace and a name. The format of the name of a Remoting Type is defined in RemotingTypeName (section 2.2.1.2).

Library

A Library is a named unit that contains a collection of Remoting Types. The names of the Remoting Types in a Library are unique within the Library. The Library name includes a version, culture string, and a hash value that together uniquely identify the Library. The format of the name of a Library is defined in LibraryName (section 2.2.1.3).<29>

System Library

A designated library that can be used to reduce the wire size for commonly used data types. The name of the Library <30> is agreed to by both the server and the client implementations of the protocol. The protocol provides mechanisms to convey the Library information in an implicit way. For more information about the specific mechanisms, see section 2.2.4.2 in this document; also see BinaryTypeEnum and Class Record definitions in [MS-NRBF].

Data Value

A Data Value is an instance of a Remoting Type that can be a Class, Array, Enum, Primitive or Server Type. Data Values are logically structured as directed edge-labeled graphs of nodes where nodes are also Data Values. Instances of Primitive Types and Enums have no outbound edges. Instances of Server Types, Arrays, and Classes have outbound edges. A single-reference graph node has a single inbound edge. A multireference graph node has multiple inbound edges.

A Data Value is defined to be Assignable to a Server Type if one of the following is true:

  • The Data Value is of the specified Server Type.

  • The Data Value is Null Object and the specified Remoting Type is a Class, Array, String, Server Interface, or Server Type.

  • The Remoting Type of the Data Value is specified to be Assignable to the specified Remoting Type.

  • If a Remoting Type is Assignable to a Class, then it is Assignable to its Base Class.

Primitive Types

Primitive Types are predefined Remoting Types. The Remoting Data Model supports the following Primitive Types specified in [MS-DTYP]:

  • BOOLEAN

  • BYTE

  • INT8

  • INT16

  • INT32

  • INT64

  • UINT16

  • UINT32

  • UINT64

The Remoting Data Model supports the Type Decimal specified in [MS-OAUT].

It also supports the following Primitive Types:

  • Char: Represents a Unicode character value.

  • String: Represents a string of Unicode characters.

  • Double: Represents a 64-bit double-precision floating-point value. A double value ranges from negative 1.79769313486232e308 to positive 1.79769313486232e308.

  • Single: Represents a 32-bit single-precision floating-point value. A Single value ranges from -3.402823e38 to positive 3.402823e38.

  • TimeSpan: Represents time duration as an integer value that specifies the number of 100 nanoseconds. The values range from -10675199 days, 2 hours, 48 minutes and 05.4775808 seconds to 10675199 days, 2 hours, 48 minutes and 05.4775807 seconds.

  • DateTime: Represents an instant of time as an INT64 value that specifies the number of 100 nanoseconds that had elapsed since 12:00:00, January 1, 0001. The value can represent time instants in a granularity of 100 nanoseconds until 23:59:59.9999999, December 31, 9999. A DateTime value can also indicate information about the time zone as follows.

     Value

     Meaning of field 'ticks'

    Unspecified

    Time zone information is not specified.

    UTC

    The time specified is in the Coordinated Universal Time (UTC) time zone.

    Local

    The time specified is in the local time zone.<31>

Null Object

Null Object is a special value that can be used in place of an instance of a Server Type, Class, Array, or String. Null Object indicates that no instance is being specified.

Class

A Class is a Remoting Type that contains a set of named values. The named values are called Members of the Class. Every Member of a Class is defined to be of a specific Remoting Type called the Member Type. The value of a Member is a Data Value that is Assignable to the Member Type. See Data Value for rules about when a Data Value is Assignable to a Remoting Type.

The Remoting Data Model supports a Class extending another Class. The extended Class is called the Base Class. The extending Class is called the Derived Class. A Derived Class can be extended by another Class. For example Class B extends Class A and Class C extends Class B. In this case both Class A and B are Base Classes of Class C and both Class B and C are Derived Classes of A. A Derived Class inherits the Members of its Base Classes. If a Class does not extend any Class then it is considered to implicitly extend a Class called System.Object. System.Object is a Class that has no Members.

Array

An Array is a Remoting Type that is an ordered collection of items. The items are identified by their position. Position is determined by a set of integer indices. The number of indices that are required to represent the position is called the Rank of the Array. An Array with Rank equal to 1 is said to be single-dimensional; an Array with Rank greater than 1 is said to be multidimensional. The Array supports specifying the lower and the upper bounds of the indices. Unless a lower bound is specified, an index value's lower bound is 0. Unless an upper bound is specified an index has no upper bounds.

An Array also specifies the Remoting Type of its items, called the Item Type. In an instance of an Array, the value of an item is a Data Value that is Assignable to the Item Type. See Data Value for rules about when a Data Value is Assignable to a Remoting Type.

Enum

Enum (short for Enumeration) is a Primitive Type whose values are constrained to a set of values. The Primitive Type is considered to be the underlying Remoting Type of the Enum. Each value of the Enum has a name associated with it that is unique within the values of the Enum.

Server Interface

A Server Interface is a Remoting Type that contains a collection of Remote Methods and Remote Field declarations. A Remote Method defined in a Server Interface does not have an implementation. A Server Interface does not have any instances.

Server Type

A Server Type is a Remoting Type that implements the Remote Methods in one or more Interfaces. The Remoting Data Model allows Server Types that extend Server Types. An Extending Server Type inherits the Methods of the extending Server Type.

Server Object

A Server Object is an instance of a Server Type.

Proxy

A Proxy is an instance of a Server Type that forwards references to Remote Methods to the Server Object for execution.

Remote Field

A Remote Field is a remotely accessible field declared in a Server Interface or a Server Type. A definition of a Remote Field includes the following:

  • Name: A String value representing the name of the Remote Field.

  • Type: The Remoting Type of the value contained by the field Remote Field.

Remote Method

A Remote Method is a remotely callable method declared in a Server Interface or a Server Type. A definition of a Remote Method includes the following:

  • Name: A String value representing the name of the Remote Method.

  • Arguments: An ordered collection of Arguments where each Argument has a name, direction, and a Remoting Type. The direction is defined as follows:

    • in: The Arguments appears in the Remote Method invocation request.

    • out: The Arguments appears in the Remote Method invocation reply.

    • ref: The Arguments appears in both the Remote Method invocation request and the Remote Method invocation reply.

  • Return Type: The Remoting Type of the value returned by the Remote Method.

  • Method Type: An enumeration indicating whether the Remote Method is One-Way or Two-Way. A One-Way Method invocation does not expect any replies.

A Method is uniquely identified in a Server Interface or a Server Type with the name of the Method and the ordered collection of Remoting Types of the Arguments, called the Method Signature.

The Remote Method invocation request consists of the following:

  • Input Arguments: An ordered collection of named Data Values, one for each Argument whose direction is 'in' or 'ref'. A Data Value corresponding to an Argument MUST be Assignable to the Remoting Type of the Argument. See Data Value for rules about when a Data Value is Assignable to a Remoting Type.

  • CallContext: A collection of name-value pairs. The collection supports any valid String as the name and any Data Value as its value. The names MUST be unique in the collection.

  • Method Signature: An ordered collection of Remoting Types. Each Remoting Type in the collection corresponds to an Argument of the Method.

The information returned by a Remote Method consists of the following:

  • Return Value: A Data Value that is Assignable to the Return Type of the Method.

  • Output Arguments: An ordered collection of named Data Values, one for each Argument whose direction is 'out' or 'ref'. A Data Value corresponding to an Argument MUST be Assignable to the Remoting Type of the Argument. See Data Value for rules about when a Data Value is Assignable to a Remoting Type.

  • Exception: A Data Value that is Assignable to the System.Exception Class. The structure of System.Exception is specified in section 2.2.2.7.

  • CallContext: A collection of name-value pairs. The collection supports any valid String as the name and any Data Value as its value. The names MUST be unique in the collection.

An Exception is returned to indicate a failure in the execution of a Remote Method. When a Remote Method's execution fails there are no Return Values or Output Arguments.

Generic Remote Method

A Generic Remote Method is a Remote Method that is parameterized by one or more Remoting Types. The method caller must provide the actual Remoting Types (in addition to the Input Arguments). It adds the following to the definition of a Method:

The Remote Method invocation request consists of the following in addition to what is defined in

  • Generic Argument Values: An Array of System.Type classes that contains the values for the parameterized Remoting Types.<32>

Delegate

A Delegate is a part of the Remoting Data Model. It contains references to one or more Remote Methods. A Delegate has a fixed Method Signature, and each Remote Method referenced by the Delegate has the same Method Signature.

Client Connection State Diagram

The following state diagram captures the state transitions during the lifetime of a client connection.

State transitions during the lifetime of a client connection

Figure 7: State transitions during the lifetime of a client connection