Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Service merger Application



serviceMerger
Function merge several services in one or split one service in several services
Distribution ServiceMerger-bin-.zip
Jar files serviceMerger.jar
Modules serviceMerger
Provided services through module configuration
Required services none
Mandatory properties config

The built-in Service merger Application allows to:
  • Merge several services in one
  • Split one service in several services
Technically, what it does is:
  • Setting values for the datas in Services for which the serviceMerger is a provider
  • With the values for the datas in Services for which the serviceMerger is a subscriber


The Services for which the serviceMerger is a provider which will be invoked are those which are related to the received datas (if the data valeus have changed).

Application properties

The application configuration has one mandatory property:

Example usage of a Service merger

This example shows a use case for the Service merger built-in application.

The misaligned Services problem

Suppose we have the following architecture:
servicemerger1
We have two modules:

The aircraft module which uses the aircraft attitude and position:
      <module name="Aircraft" >
         <interfaces>
            <subscribe service="attitude" />
            <subscribe service="position" />
         </interfaces>
      </module>
We have the following services definition:
      <services>
         <publish name="attitude" >
            <data name="theta" type="float" />
            <data name="phi" type="float" />
         </publish>
         <publish name="position">
            <data name="latitude" type="float" />
            <data name="longitude" type="float" />
            <data name="altitude" type="float" />
         </publish>
      </services>
And the SimulationEngine module which computes the aircraft characteristics:
      <module name="SimulationEngine" >
         <interfaces>
            <push service="aircraftModel" />
         </interfaces>
      </module>
We have the following service definition:
      <services>
         <publish name="aircraftModel" >
            <data name="theta" type="float" />
            <data name="phi" type="float" />
            <data name="acLatitude" type="float" />
            <data name="acLongitude" type="float" />
            <data name="acAltitude" type="float" />
         </publish>
      </services>
We would like to compute the aircraft data by the SimulationEngine module and use them by the aircraft module but is is not possible because they use different services even if in fact they use the same datas. it is not in this case possible to use a Service alias because just renaming a Service would not work. One solution is to define another module using the Service merger Application.

Service merger solution

We can define a new Service merger Application with the following architecture:
servicemerger2
This module will make the bridge between the aircraftModel Service and the position and attitude Services.
      <mergerConf>
         <outputService name="attitude" >
            <inputService name="aircraftModel" />
            <data name="theta" fromData="theta" fromService="aircraftModel" />
            <data name="phi" fromData="phi" fromService="aircraftModel" />
         </outputService>
         <outputService name="position" >
            <inputService name="aircraftModel" />
            <data name="latitude" fromData="acLatitude" fromService="aircraftModel" />
            <data name="longitude" fromData="acLongitude" fromService="aircraftModel" />
            <data name="altitude" fromData="acAltitude" fromService="aircraftModel" />
         </outputService>
      </mergerConf>

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence