Delay-Tolerant Networking | M. Sinkiat |
Internet-Draft | ASRC Space And Defense, NASA GSFC |
Intended status: Informational | S. Jacobs |
Expires: March 12, 2016 | E. Birrane |
Johns Hopkins Applied Physics Laboratory | |
September 9, 2015 |
AMP Manager SQL Interface
draft-birrane-dtn-ampmgr-sql-00
This document describes a proposed public interface through which an application, such as a network management console, interacts with an Asynchronous Management Protocol (AMP) Manager via a database supporting the Structured Query Language (SQL). The use of SQL as an interfacing layer provides a natural way to describe interactions with an AMP Manager independent of a particular implementation of either the Manager or the application. Specifically, this document presents a database schema capturing how to send controls to a Manager and how to accept reports received by a Manager from one or more AMP Agents.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 12, 2016.
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document presents a public interface through which an application, such as a network management console, interacts with an Asynchronous Management Protocol ([AMP]) Manager via a database supporting the Structured Query Language (SQL). Such an interface is useful as an implementation independent way of specifying how an application may interact with an AMP Manager to issue commands (such as through a custom graphical user interface) and to receive reports (as they are received by one or more AMP Agents).
This document describes a database layout comprised of a series of names tables and the columns the comprise those tables. Where appropriate, primary and foreign key constraints are also discussed. This set of tables presents a data model through which all AMP Manager roles and responsibilities, as defined in the Asynchronous Management Architecture ([AMA]), can be accomplished.
Application developers can use this specification to describe how to populate a database with AMP-related information such that an AMP Manager implementation can read and use this data to effect AMP behavior. By reading and writing the tables in accordance with this specification, applications can claim conformance with the AMP Manager regardless of which AMP Manager implementation is used, so long as such a Manager is also in conformance with this specification.
AMP Manager developers use this specification to describe how AMP users input actions to the Manager and how to send received reports back to those users.
This document covers table names and the names, data types, default values, and comments associated with each column of each names table. These types should be appropriate for any database implementing a SQL interface and SHOULD NOT use any language or function specific to a particular SQL database vendor.
This document does not specify the setup, configuration, administration, or other function associated with a particular SQL database vendor. Further, this document does not specify how either the application or the AMP Manager log on to the database, or how database communications are verified and secured. Finally, this document does not discuss the architecture associated with incorporating a database between an application and an AMP Manager, as such architectures are likely tightly coupled to a network deployment.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
This specification uses a naming convention to delineate between two types of database tables: those containing mutable data and those containing immutable data. Tables containing mutable data are named with the prefix "dbt" where tables containing immutable data are named with the prefix "lvt", as defined below.
This specification assumes that all tables exist in a database called "amp_core", capturing the information necessary to capture core operations associated with the AMP Manager.
The schema contains tables capturing information about various areas of the AMP Manager interface. The following table types are defined.
+-------------------------+------------------------+ | Table Name | Table Type | +-------------------------+------------------------+ | lvtDataTypes | Constants | | lvtIncomingState | Constants | | lvtMIDCategory | Constants | | lvtMIDOIDType | Constants | | lvtMIDType | Constants | | lvtOutgoingState | Constants | | dbtADMNicknames | ADM Support | | dbtADMs | ADM Support | | dbtProtoMIDParameter | ADM Support | | dbtProtoMIDParameters | ADM Support | | dbtProtoMIDs | ADM Support | | dbtRegisteredAgents | Agent Support | | dbtDataCollection | MID Information | | dbtDataCollections | MID Information | | dbtMIDCollection | MID Information | | dbtMIDCollections | MID Information | | dbtMIDs | MID Information | | dbtOIDs | MID Information | | dbtOutgoingMessageGroup | Outgoing Support | | dbtOutgoingMessages | Outgoing Support | | dbtIncomingMessageGroup | Incoming Support | | dbtIncomingMessages | Incoming Support | +-------------------------+------------------------+
Figure 1: amp_core tables
The specification comprises 16 dbt tables and 7 lvt tables, as in Figure 1.
Data types, as defined in the AMP, enumerate the types of information associated with collections of data, such as defined in MID parameters, computed values, and report definitions.
+-------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+-------+ | ID | int(10) unsigned | NO | PRI | NULL | | | Name | varchar(50) | NO | UNI | | | | Description | varchar(255) | NO | | | | +-------------+------------------+------+-----+---------+-------+
lvtDataTypes
The format of the table is as follows.
+----+--------+-------------------------------------+ | ID | Name | Description | +----+--------+-------------------------------------+ | 0 | BYTE | 8-bits; Standard Byte | | 1 | INT | Signed 32-bit Integer | | 2 | UINT | Unsigned 32-bit Integer | | 3 | VAST | Signed 64-bit Integer | | 4 | UVAST | Unsigned 64-bit Integer | | 5 | REAL32 | Single-Precision Floating Point | | 6 | REAL64 | Double-Precision Floating Point | | 7 | STR | Character String | | 8 | BLOB | Binary Large Object (Length + Data) | | 9 | SDNV | Self-Delineating Numerical Value | | 10 | TS | Timestamp | | 11 | DC | Data Collection | | 12 | MID | Managed Identifier | | 13 | MC | Managed Identifier Collection | | 14 | EXPR | Expression | | 15 | DEF | Definition | | 16 | TRL | Time-Based Rule | | 17 | SRL | State-Based Rule | | 18 | TDC | Typed Data Collection | | 19 | RPT | Report | | 20 | MACRO | Macro | | 21 | UNK | Unknown Type | +----+--------+-------------------------------------+
lvtDataTypes Example
An example of such a table is illustrated below.
When reports are being received by a Manager from an Agent, they will be written into various Incoming Support table types. However, the application reviewing these incoming reports should not start to read them until the Manager has finished receiving and persisting them into the database.
+-------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+---------------------+------+-----+---------+-------+ | ID | tinyint(3) unsigned | NO | PRI | NULL | | | Name | varchar(50) | NO | | | | | Description | varchar(255) | NO | | | | +-------------+---------------------+------+-----+---------+-------+
lvtIncomingState
The lvtIncomingState table identifies three different wait states associated with receiving reports from Agents. The format of the table is defined as follows.
+----+--------------+-----------------------------------------+ | ID | Name | Description | +----+--------------+-----------------------------------------+ | 0 | Initializing | Manager is receiving reports. | | 1 | Ready | Manager has completed reception. | | 2 | Processed | Application is done processing reports. | +----+--------------+-----------------------------------------+
lvtIncomingState Example
An example of such a table is illustrated below.
+-------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+-------+ | ID | int(10) unsigned | NO | PRI | NULL | | | Name | varchar(50) | NO | UNI | | | | Description | varchar(255) | NO | | | | +-------------+------------------+------+-----+---------+-------+
lvtMIDCategory
The lvtMIDCategory table identifies the three different MID categories as defined in the AMP. The format of the table is defined as follows.
+----+------------+-----------------+ | ID | Name | Description | +----+------------+-----------------+ | 0 | Atomic | Measured Values | | 1 | Computed | Computed Values | | 2 | Collection | Array of Values | +----+------------+-----------------+
lvtMIDCategory Example
An example of such a table is illustrated below.
+-------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+-------+ | ID | int(10) unsigned | NO | PRI | NULL | | | Name | varchar(50) | NO | UNI | | | | Description | varchar(255) | NO | | | | +-------------+------------------+------+-----+---------+-------+
lvtMIDOIDType
The lvtMIDOIDType table identifies the four different OID categories as defined in the AMP. The format of the table is defined as follows.
+----+------------------------------+-------------+ | ID | Name | Description | +----+------------------------------+-------------+ | 0 | Full OID | | | 1 | Parameterized OID | | | 2 | Compressed Full OID | | | 3 | Compressed Parameterized OID | | +----+------------------------------+-------------+
lvtMIDOIDType Example
An example of such a table is illustrated below.
+-------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+---------+-------+ | ID | int(10) unsigned | NO | PRI | NULL | | | Name | varchar(50) | NO | UNI | | | | Description | varchar(255) | NO | | | | +-------------+------------------+------+-----+---------+-------+
lvtMIDType
The lvtMIDType table identifies the four different MID types as defined in the AMP. The format of the table is defined as follows.
+----+----------+-------------+ | ID | Name | Description | +----+----------+-------------+ | 0 | Data | | | 1 | Control | | | 2 | Literal | | | 3 | Operator | | +----+----------+-------------+
lvtMIDType Example
An example of such a table is illustrated below.
When controls are being sent via a Manager to an Agent, they will be written into various Outgoing Support table types. However, the Manager receiving these outgoing controls should not start to read them until the application has finished writing them into the database.
+-------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+-------+ | ID | tinyint(4) | NO | PRI | NULL | | | Name | varchar(50) | NO | | | | | Description | varchar(255) | NO | | | | +-------------+--------------+------+-----+---------+-------+
lvtOutgoingState
The lvtOutgoingState table identifies four different wait states associated with sending controls to Agents. The format of the table is defined as follows.
+----+--------------+---------------------------------+ | ID | Name | Description | +----+--------------+---------------------------------+ | 0 | Initializing | Application writing controls. | | 1 | Ready | Ready for Sending to Agent. | | 2 | Processing | Manager sending controls. | | 3 | Sent | Manager send completed. | +----+--------------+---------------------------------+
lvtOutgoingState Example
An example of such a table is illustrated below.
+----------------+------------------+------+-----+------------+-----------+ | Field | Type | Null | Key | Default | Extra | +----------------+------------------+------+-----+------------+-----------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_incr | | ADM_ID | int(10) unsigned | NO | MUL | NULL | | | Nickname_UID | int(10) unsigned | NO | | NULL | | | Nickname_Label | varchar(25) | NO | | "" | | | OID | int(10) unsigned | NO | MUL | NULL | | +----------------+------------------+------+-----+------------+-----------+
dbtADMNicknames
The dbtADMNicknames table identifies all of the nicknames associated with supported ADMs. A Nickname in the AMA is an enumeration of a common OID subtree defined in the context of an ADM. Nickname enumerations MUST be unique. The format of the table is defined as follows.
+---------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | Label | varchar(255) | NO | UNI | | | | Version | varchar(255) | NO | | | | | OID | int(10) unsigned | NO | MUL | NULL | | +---------+------------------+------+-----+---------+----------------+
dbtADMs
The dbtADMs table identifies all of the ADMs supported by the AMP Manager and associated application. The format of the table is as follows.
MIDs identifying items such as Controls may accept parameters to customize their behavior. When defined in the context of an ADM, a parameterized MID only includes the non-parameterized portion of the MID followed by the expected data types for the parameterized portion of the MID. This, essentially, acts as a template for populating a specific instance of the MID with actual data.
This "template" is referred to as a protoMID, as it is used to generate MID instances. The amp_core database schema identifies three tables used to capture protoMID definitions from ADMs: dbtProtoMIDParameter, dbtProtoMIDParameters, and dbtProtoMIDs.
+-----------------+------------------+------+-----+---------+-----------+ | Field | Type | Null | Key | Default | Extra | +-----------------+------------------+------+-----+---------+-----------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_incr | | CollectionID | int(10) unsigned | YES | MUL | NULL | | | ParameterOrder | int(10) unsigned | NO | | 0 | | | ParameterTypeID | int(10) unsigned | YES | MUL | NULL | | +-----------------+------------------+------+-----+---------+-----------+
dbtProtoMIDParameter
The dbtProtoMIDParameter table contains a row for each parameter associated with a protoMID. All of the parameters for a protoMID, together, are considered a "collection" of parameters. The format of the table is as follows.
+---------+------------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+------------------+------+-----+------------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | Comment | varchar(255) | NO | | No Comment | | +---------+------------------+------+-----+------------+----------------+
dbtProtoMIDParameters
The dbtProtoMIDParameters table represents the ordered set of parameters associated with a ProtoMID. The format of the table is as follows.
+--------------+------------------+------+-----+----------------+----------+ | Field | Type | Null | Key | Default | Extra | +--------------+------------------+------+-----+----------------+----------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_inc | | NicknameID | int(10) unsigned | YES | MUL | NULL | | | OID | int(10) unsigned | NO | MUL | NULL | | | ParametersID | int(10) unsigned | YES | MUL | NULL | | | DataType | int(10) unsigned | NO | MUL | 0 | | | OIDType | int(10) unsigned | NO | MUL | 0 | | | Type | int(10) unsigned | NO | MUL | 0 | | | Category | int(10) unsigned | NO | MUL | 0 | | | Name | varchar(50) | NO | | Unnamed | | | Description | varchar(255) | NO | | No Description | | +--------------+------------------+------+-----+----------------+----------+
dbtProtoMIDs
The dbtProtoMIDs table stores all known ProtoMIDs. The format of the table is as follows.
+---------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | AgentId | varchar(128) | NO | | ipn:0.0 | | +---------+------------------+------+-----+---------+----------------+
dbtRegisteredAgents
The dbtRegisteredAgents table lists the network identifiers for each Agent known in the network. The format of the table is defined as follows.
Data collection tables capture the Data Collection (DC) data type as defined in [AMP]. Similar to the ProtoMIDParameter(s) table, Data Collections are represented as an ordered collection of individual data items, with one table representing the collection itself, and another table holding the ordered data within the collection.
+--------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+------------------+------+-----+---------+-------+ | CollectionID | int(10) unsigned | NO | PRI | NULL | | | DataOrder | int(10) unsigned | NO | PRI | 0 | | | DataType | int(10) unsigned | NO | MUL | NULL | | | DataBlob | blob | YES | | NULL | | +--------------+------------------+------+-----+---------+-------+
dbtDataCollection
The dbtDataCollection table holds data collection entries, one per row. The format of the table is defined as follows.
+-------+------------------+------+-----+----------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+------------------+------+-----+----------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | Label | varchar(255) | NO | | Unnamed | | +-------+------------------+------+-----+----------+----------------+
dbtDataCollections
The dbtDataCollections table holds information for a particular collection of data entries (from dbtDataCollection). The format of the table is defined as follows.
A MID Collection is an ordered set of MID values, similar to a Data Collection, which is an ordered set of Data values. One table is used to represent the MID Collection, and another table is used to capture the ordered MIDs in the collection.
+--------------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+------------------+------+-----+---------+-------+ | CollectionID | int(10) unsigned | NO | PRI | NULL | | | MidID | int(10) unsigned | NO | PRI | NULL | | | MIDOrder | int(10) unsigned | NO | PRI | 0 | | +--------------+------------------+------+-----+---------+-------+
dbtMIDCollection
The dbtMIDCollection table holds MID collection entries, one per row. The format of the table is defined as follows.
+---------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | Comment | varchar(255) | YES | | NULL | | +---------+------------------+------+-----+---------+----------------+
dbtMIDCollections
The dbtMIDCollections table holds information for a particular collection of MIDs (from dbtMIDCollection). The format of the table is defined as follows.
+--------------+---------------------+------+-----+----------+-------------+ | Field | Type | Null | Key | Default | Extra | +--------------+---------------------+------+-----+----------+-------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_incr | | NicknameID | int(10) unsigned | YES | MUL | NULL | | | OID | int(10) unsigned | NO | MUL | NULL | | | ParametersID | int(10) unsigned | YES | MUL | NULL | | | Type | int(10) unsigned | NO | MUL | NULL | | | Category | int(10) unsigned | NO | MUL | NULL | | | IssuerFlag | bit(1) | NO | | b'0' | | | TagFlag | bit(1) | NO | | b'0' | | | OIDType | int(10) unsigned | YES | MUL | NULL | | | IssuerID | bigint(20) unsigned | NO | | 0 | | | TagValue | bigint(20) unsigned | NO | | 0 | | | DataType | int(10) unsigned | NO | MUL | NULL | | | Name | varchar(50) | NO | | Unnamed | | | Description | varchar(255) | NO | | None | | +--------------+---------------------+------+-----+----------+-------------+
dbtMIDs
The dbtMIDs table captures the MIDs in the database. Some MIDs will be auto-populated from ADMs. Others will be added dynamically by users of the system. As per [AMP], a MID without an identified Issuer field is assumed to be as defined in an ADM. The format of the table is defined as follows.
+-------------+------------------+------+-----+------------+-----------+ | Field | Type | Null | Key | Default | Extra | +-------------+------------------+------+-----+------------+-----------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_incr | | IRI_Label | varchar(255) | NO | MUL | NONE | | | Dot_Label | varchar(255) | NO | | 1.2.3.4 | | | Encoded | varchar(255) | NO | | BEEFFEED | | | Description | varchar(255) | NO | | None | | +-------------+------------------+------+-----+------------+-----------+
dbtOIDs
The dbtOIDs table captures the Object Identifiers encapsulated in a MID. For Full OIDs, this includes the length and octet set captured using Binary Encoding Rules (BER), as specified in [AMP]. For compressed OIDs, this includes the relative OID from some root tree, also encoded as a length and octet set captured using BER. The format of the table is defined as follows.
Outgoing messages are those that are written into the database by an application and read by an AMP Manager, formatted, and sent to one or more AMP Agents.
The database represents outgoing messages in two tables. One table holds information for the entire outgoing message group, and another table captures each individual outgoing message. An individual outgoing message is simply a MID collection of the MIDs to be run on the Agent.
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | OutgoingID | int(10) unsigned | NO | MUL | NULL | | | StartTS | bigint(20) | NO | | 0 | | | MidCollID | int(10) unsigned | NO | MUL | NULL | | +------------+------------------+------+-----+---------+----------------+
dbtOutgoingMessages
The dbtOutgoingMessages table captures a single MID Collection holding the set of Control MIDs to be sent to an Agent as part of a Message Group. The format of the table is defined as follows.
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | CreatedTS | datetime | YES | | NULL | | | ModifiedTS | datetime | YES | | NULL | | | State | tinyint(4) | NO | MUL | NULL | | | AgentID | int(10) unsigned | NO | MUL | NULL | | +------------+------------------+------+-----+---------+----------------+
dbtOutgoingMessageGroup
The dbtOutgoingMessageGroup table captures an outgoing message group, which is one or more outgoing messages. The format of the table is defined as follows.
Incoming messages are those that are written into the database by an AMP Manager and read by an application wishing to understand the status of an AMP Agent.
The database represents incoming messages in two tables. One table holds information for the entire incoming message group, and another table captures each individual incoming message.
+------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+------------------+------+-----+---------+----------------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_increment | | IncomingID | int(10) unsigned | NO | MUL | NULL | | | Content | blob | YES | | NULL | | +------------+------------------+------+-----+---------+----------------+
dbtIncomingMessages
The dbtIncomingMessages table captures information returned from an AMP Agent. The format of the table is defined as follows.
+-------------+---------------------+------+-----+---------+-----------+ | Field | Type | Null | Key | Default | Extra | +-------------+---------------------+------+-----+---------+-----------+ | ID | int(10) unsigned | NO | PRI | NULL | auto_incr | | ReceivedTS | datetime | YES | | NULL | | | GeneratedTS | datetime | YES | | NULL | | | State | tinyint(3) unsigned | NO | MUL | NULL | | | AgentID | int(10) unsigned | NO | MUL | NULL | | +-------------+---------------------+------+-----+---------+-----------+
dbtIncomingMessageGroup
The dbtIncomingMessageGroup table captures an incoming message group, which is one or more incoming messages. The format of the table is defined as follows.
At this time, this schema definition has no fields registered by IANA.
Security considerations are outside of the scope of this document.
[AMA] | Birrane, E., "Asynchronous Management Architecture", Internet-Draft draft-birrane-dtn-ama-01, August 2015. |
[AMP] | Birrane, E., "Asynchronous Management Protocol", Internet-Draft draft-birrane-dtn-amp-01, August 2015. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
The following participants contributed technical material, use cases, and useful thoughts on the overall approach to this database specification: Leor Bleir of the NASA Goddard Space Flight Center, Michael Deschu and Shane Knudsen of Hammers Company, Inc. on behalf of the NASA Goddard Space Flight Center, and Paul Swencon of ASRC Space And Defense on behalf of the NASA Goddard Space Flight Center.