Download 1 Overview 2 Components included - Emits

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
ESA MAL Software Stack
1 Overview
This software library provides a complete implementation of the CCSDS Message
Abstraction Layer (MAL). It includes an example message transport, two example
message encoders, and a small demonstration application.
2 Components included
A complete stack for the MO software is provided, and includes a demo transport
(using Java RMI), two demo message encoders (binary and string based), and a
simple demo application.
The following diagram shows the components and how they are deployed into two
consumer and provider applications:
Consumer
Demo Client Application
Demo Provider Application
Service Specific API
Service Specific API
Service Stub
Service Skeletons
MAL API
MAL API
MAL Implementation
MAL Implementation
Standard Transport API
Standard Transport API
Transport Adapter
Implementation
Transport Adapter
Implementation
Sec API
Sec API
Sec
Impl
Provider
Sec
Impl
Message transport
Messaging Middleware
2.1 Demo Client/Provider Application
This component implements a simple service that demonstrates the basics of the MAL
and also how this is implemented in Java. It provides two applications, a client
consumer application and a provider application, that interact with each other driven
by a graphical interface. The example service provides simple test operations and also
a simple publish/subscribe example that is like a simple parameter service. The
provider application allows you to control the size of the parameter pool and also the
publish rate, whereas the consumer allows you to configure the subscription.
These demonstration applications are explored more in section 4.
2.2 Service Specific API
The Java representation of the abstract service specification. This is derived by using
the transform specified in the Java API specification, and auto generated by the
service stub generator (see section 2.11).
2.3 Service Stub/Skeleton
The layer of code that maps from the Service Specific API to the MAL API in Java.
This is derived by using the transform specified in the Java API specification, and
auto generated by the service stub generator (see section 2.11).
2.4 MAL API
The standard MAL API in Java as specified in the Java MAL API specification. Is a
set of Java interfaces that provide a standard interface to a Java MAL implementation.
2.5 MAL Implementation
An implementation of the MAL blue book in Java.
2.6 Security API
The standard MAL Security API in Java as specified in the Java MAL API
specification.
2.7 Security Implementation
Provides the required access control and security component for the MAL
implementation. All messages sent and received by a MAL pass through this
component, the default implementation does nothing but this can by replaced at
runtime.
2.8 Standard Transport API
The standard MAL Transport API in Java as specified in the Java MAL API
specification.
2.9 Transport Adapter Implementation
Maps from the standard transport API to the relevant interface for the chosen
transport. A single example transport based on RMI is supplied. It is designed to use a
message encoder, using the standard encoder API of the Java MAL API, and two are
provided, a binary encoder and a string based encoder.
This is explored further in section 5.
2.10 Message Transport
In the example deployment it uses the built in Java RMI protocol as a transport.
2.11 Service Stub Generator
Not shown. Generates service specific APIs and stubs and skeletons according to the
transformation provided by the Java MAL language mapping. Reads a service
specification XML file which describes the service interface to generate.
3 How to build
The components use Apache Maven (http://maven.apache.org/) to build. There is also
a dependency on Java (at least version 1.5), so a version of the Java Development Kit
(JDK) (http://www.oracle.com/technetwork/java/javase/downloads/index.html) must
be installed.
The supplied code archive should be expanded into a directory.
A top level Maven build file (called a POM) is included, and a complete build can be
started by entering the top level directory and executing:
mvn install
This will build all of the components, in the correct order and also the demonstration
application.
The first time this is executed it may take some time as Maven will download all the
required build components from the internet. Following builds should be much
quicker.
You should ensure that the Java compiler and the Maven build system is installed
correctly on your system, and available in the path, before attempting to build the
components.
4 The demonstration applications
The demonstration consists of two applications, a service provider and consumer. The
demonstration implements a very basic version of the Parameter service. The basic
deployment is:
• A single Parameter provider
• Multiple client consumers
The provider application presents the following user interface:
Figure 1 – Service provider application
It publishes parameter updates to a configurable number of 16bit signed integers at a
configurable rate. Consumers register interest in the set and receive updates as they
are sent.
The provider application allows the user sets the pool size (how many parameters are
updated), the block size (updates are sent in blocks of this many) and the rate.
The client consumer application subscribes for parameter updates and displays them
in a simple grid display. It also shows the average latency delay for the last update.
Multiple instances of this application can be run:
Figure 2 – Client consumer application
The use of the CCSDS Java MAL API allows swapping of Transports without
modification of code. Two primary types of transports are possible:
• Point to Point (PTP)
o MAL layer in Provider is responsible for managing the subscription of
the Consumers (internal Broker)
o May still use an external broker for message routing
• Pub/Sub (PS)
o MAL layer in Provider delegates management of the subscription of
the Consumers to the Transport
o Publish operation sends individual parameter updates to transport
‘Topics’
o External Transport specific broker is responsible for routing the
required updates to the correct Consumers
It should be noted that RMI is a PTP transport.
5 Example Transport adaptor
This section details the components that form the transport adaptor and the example
ones provided by this software.
A transport adaptor is responsible for two things, encoding/decoding messages from
the Java objects in memory to the on-the-wire representation, and for transporting that
encoded message to the destination application.
The ESA transport adaptor is split into three main components, the first is a generic
MAL transport framework, the second is an extension of that for the Java RMI
protocol, and the third is the encoder/decoder to use:
Transport Adapter Implementation
Generic Transport
Framework
Message
Encoder/Decoder
Java RMI Transport
Extension
Two encoder/decoders are supplied, the first is a simple string based encoder, the
second is a fast and efficient binary encoder.
The RMI transport examines the following Java system property to determine which
encoder to use:
org.ccsds.moims.mo.mal.encoding.protocol.rmi
This must be set to the class name of the class that extends the base encoding factory
class, namely:
esa.mo.mal.encoder.string.StringStreamFactory
for the string encoder. And:
esa.mo.mal.encoder.binary.BinaryStreamFactory
for the binary encoder.