Messages

As depicted in Fig. 110, there are 5 base message types in the INTERSECT messaging schema:

Command

The CommandMessage type is a command message sent from a source to a target that requires an action from the target. When the target receives the message, they must acknowledge receipt of the message immediately with an AcknowledgeMessage type. Processing of the actual command commences any time after acknowledgement.

Acknowledge

The AcknowledgeMessage type is a response to a command message. The response is either “ACCEPTED” or “REJECTED”, with any optional details provided in the message body. This message only indicates if a CommandMessage has been accepted for processing and not the status of the processing.

Request

The RequestMessage type is a request message sent from a source to a target that is more inquisitive and requires a response from the target. When the target receives the message, the target deciphers the request found in the message body, processes the request, and then sends a reply to the source using the ReplyMessage type.

Reply

The ReplyMessage type is a response to a request message. The response is found in the message body and provides detailed information.

Event

The EventMessage type is a notification message type that is either directed at a single target or multiple targets (broadcast). This message is asynchronous and does not need a response or acknowledgement. Some examples of EventMessage are heartbeat messages, log messages, and status to completion messages.

A ScienceEcosystemMessage will contain only one of these 5 base message types per message. Each message has a similar “header” and the body content is an XML instance based on the schema provided in the header. This will allow the system to expand and incorporate many different components without the need for a single, monolithic schema.

Base data types for INTERSECT messages.

Fig. 110 Base data types for INTERSECT messages.

Message Schema

The details of each element, attribute, and type, along with the URI of any inherited types, are described in the following schema:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2021 rel. 2 (x64) (http://www.altova.com) by Olga Kuchar (Oak Ridge National Lab) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" attributeFormDefault="unqualified" vc:minVersion="1.1">
	<xs:element name="ScienceEcosystemMessages">
		<xs:annotation>
			<xs:documentation>Top element for the INTERSECT System-of-Systems Messages.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice>
				<xs:element name="CommandMessage" type="CommandMessageType">
					<xs:annotation>
						<xs:documentation>Command message type.  Requires action for receiver.  Must be responded to by an acknowledgement.  Immediate response expected with deferred processing.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="AcknowledgeMessage" type="AcknowledgeMessageType">
					<xs:annotation>
						<xs:documentation>Acknowledgement message type.  Response to CommandMessage.  Response is Accepted/Rejected.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="RequestMessage" type="RequestMessageType">
					<xs:annotation>
						<xs:documentation>Request message type.  Inquisitive for receiver.  Must be responded to by a reply.  Response expected after processing is complete. </xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="ReplyMessage" type="ReplyMessageType">
					<xs:annotation>
						<xs:documentation>Reply message type.  Response to RequestMessage.  Response is detailed.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="EventMessage" type="EventMessageType">
					<xs:annotation>
						<xs:documentation>Notification message type.  Asynchronous and does not need a response or acknowledgement.  Examples include heartbeat message, log message, status message.</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:element name="SourceID">
		<xs:annotation>
			<xs:documentation>The sender ID of this message.  This is the ID of the component or system at which this message was formulated.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="TargetID">
		<xs:annotation>
			<xs:documentation>The receiver ID of this message.  This is the ID of the component or system at which this message was sent.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MessageID" type="xs:ID">
		<xs:annotation>
			<xs:documentation>The ID of this message.  If "Command" or "Request", this is the ID used in the "Ack" or "Reply" message.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MessageCreationDateTimeUTC" type="xs:dateTime">
		<xs:annotation>
			<xs:documentation>The UTC date and time that this message instance was created.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="CommandMessageType">
		<xs:annotation>
			<xs:documentation>Base type for a CommandMessage.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="MessageID"/>
			<xs:element ref="MessageCreationDateTimeUTC">
				<xs:annotation>
					<xs:documentation>The UTC date and time that this message instance was created.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element ref="SourceID">
				<xs:annotation>
					<xs:documentation>The sender ID of this message.  This is the ID of the component or system at which this message was formulated.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element ref="TargetID">
				<xs:annotation>
					<xs:documentation>The receiver ID of this message.  This is the ID of the component or system at which this message was sent.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element ref="MessageSchemaURI"/>
			<xs:element ref="MessageType" minOccurs="0"/>
			<xs:element ref="MessageName" minOccurs="0">
				<xs:annotation>
					<xs:documentation>The name for the given message type.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element ref="MessageVersion" minOccurs="0"/>
			<xs:element ref="MessageContent">
				<xs:annotation>
					<xs:documentation>The actual message content, deciphered by either MessageSchemaURI or (MessageType, MessageName, MessageVersion).</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="MessageSchemaURI" type="xs:anyURI">
		<xs:annotation>
			<xs:documentation>The URL of the schema to decipher the MessageContent element.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MessageType" type="xs:string">
		<xs:annotation>
			<xs:documentation>The type of message - enumerated list.  See ScienceEcosystemMessageTypes.xsd for the current listing.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MessageName">
		<xs:annotation>
			<xs:documentation>The name for the given message type.</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:minLength value="1"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="MessageVersion">
		<xs:annotation>
			<xs:documentation>The version of the message type being used in the MessageContent element.</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:decimal">
				<xs:minInclusive value="0"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:element name="MessageContent" type="xs:base64Binary">
		<xs:annotation>
			<xs:documentation>The actual message content, deciphered by either MessageSchemaURI or (MessageType, MessageName, MessageVersion).</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="ResponseToMessageID" type="xs:ID">
		<xs:annotation>
			<xs:documentation>The MessageID relating to the original request.</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="AcknowledgeMessageType">
		<xs:sequence>
			<xs:element ref="MessageID"/>
			<xs:element ref="MessageCreationDateTimeUTC"/>
			<xs:element ref="SourceID"/>
			<xs:element ref="TargetID"/>
			<xs:element ref="ResponseToMessageID"/>
			<xs:element ref="ResponseSummary"/>
			<xs:element ref="MessageSchemaURI"/>
			<xs:element ref="MessageType" minOccurs="0"/>
			<xs:element ref="MessageName" minOccurs="0"/>
			<xs:element ref="MessageVersion" minOccurs="0"/>
			<xs:element ref="MessageContent"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ReplyMessageType">
		<xs:annotation>
			<xs:documentation>Base type for a ReplyMessage.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="MessageID"/>
			<xs:element ref="MessageCreationDateTimeUTC"/>
			<xs:element ref="SourceID"/>
			<xs:element ref="TargetID"/>
			<xs:element ref="ResponseToMessageID"/>
			<xs:element ref="ResponseSummary"/>
			<xs:element ref="MessageSchemaURI"/>
			<xs:element ref="MessageType" minOccurs="0"/>
			<xs:element ref="MessageName" minOccurs="0"/>
			<xs:element ref="MessageVersion" minOccurs="0"/>
			<xs:element ref="MessageContent"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ResponseSummary">
		<xs:annotation>
			<xs:documentation>Enumerated type of SUCCESS or FAILURE only.  More information is provided in MessageContent element.</xs:documentation>
		</xs:annotation>
		<xs:simpleType>
			<xs:restriction base="xs:string">
				<xs:enumeration value="SUCCESS"/>
				<xs:enumeration value="FAILURE"/>
			</xs:restriction>
		</xs:simpleType>
	</xs:element>
	<xs:complexType name="RequestMessageType">
		<xs:annotation>
			<xs:documentation>Base type for a RequestMessage.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="MessageID"/>
			<xs:element ref="MessageCreationDateTimeUTC"/>
			<xs:element ref="SourceID"/>
			<xs:element ref="TargetID"/>
			<xs:element ref="MessageSchemaURI"/>
			<xs:element ref="MessageType" minOccurs="0"/>
			<xs:element ref="MessageName" minOccurs="0"/>
			<xs:element ref="MessageVersion" minOccurs="0"/>
			<xs:element ref="MessageContent"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="EventMessageType">
		<xs:annotation>
			<xs:documentation>Base type for a EventMessage.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element ref="MessageID"/>
			<xs:element ref="MessageCreationDateTimeUTC"/>
			<xs:element ref="SourceID"/>
			<xs:element ref="TargetID"/>
			<xs:element ref="MessageSchemaURI"/>
			<xs:element ref="MessageType" minOccurs="0"/>
			<xs:element ref="MessageName" minOccurs="0"/>
			<xs:element ref="MessageVersion" minOccurs="0"/>
			<xs:element ref="MessageContent"/>
		</xs:sequence>
	</xs:complexType>
</xs:schema>