Understanding SmartTools' SOA

It is about connecting components

The main idea of software components is that your software is not one single piece of code, but as many components as concerns of your software. One component has one concern of your business, this why we talk about business code.

Connecting components

In this example, the Ticket Office wishes to communicate with an Airline Company. For that we declare that the component "TicketOffice" is connected to the component "AirlineCompany".

The role of the ticket office is to take order from clients, like a reservation. The role of the airline company is to sell free places.

It is about components communication

Components will send message in destination to another component: an order, a response, a transation, etc.

Message

The message is very like a mail in the physical and the virtual world.

The communications are asynchronous.

Structure of a component

A component is structured like this:

Component structure

The business code is embedded in a facade, which is in a container. The container is in charge of the communication and the connection with other containers.

Each container has a thread, which reads a FIFO of received messages. The thread invokes the appropriate business code through the facade.

Type of components

SmartTools enhances OSGi by enabling multiple instanciation of a component.

As a developer, you define a type of component, SmartTools will instantiate a component of this type.

Type of component

Connecting 2 components and instantiation

To connect 2 components, you say (connectTo id_src=A-1 type_dest=B id_dest=B-1).

If B-1 doen't exist yet, SmartTools will start it for you, without you have to order (startComponent type=B id=B-1).

Connecting and starting components

Component Description

Every type of component has a description (like SCA) that defines the outputs and inputs services.

Component Description (ML)

Component's description is used for connecting components

The wires between output and input services are evaluated and created with components' descriptions (unlike SCA).

Connecting components' services

Output services 'a' is connected to all input services 'a'

You can send a message to more than one component.

You can receive a message from more than one component.

all output 'a' connected to all input 'a'

SmartTools runs with OSGi

OSGi is a popular modules platform.

A SmartTools type of component is define in one OSGi bundle.

The type and each component are registered in OSGi as services. (symbol stars)

The bundle must be started (green triangle) so that it defines the SmartTools component.

SmartTools integration over OSGi

Components Manager

It is a component defined in SmartTools that connects components each other.

All components are connected to the Components Manager and can order it to connect to another component.

Components Manager
Components Manager

Local components repository

Components Manager is splitted in different modules: first is local DS (Directory Service), then comes remote DS (Discovery Service) (see next section).

Local DS knows every local components' types and instances.

Local DS knows how to connect local components only.

Local DS

World: first initialization

The Components Manager starts with a World configuration and initializes then the environment with this World DSL.

World

World example (DB)

The two pictures illustrate an example of some components initialized and connected with a World file. The graph shows us what components are started and how the components are connected each other.

This is how SmartTools is activated on a RCP (same as Eclipse):

SmartTools on Eclipse World file
Graph result

Next: distributing SmartTools components

Last modified: $Date: 2008-09-02 15:56:02 +0200 (Mar, 02 sep 2008) $