Macro Architecture

Server vs Engine

We know that it might be confusing. For us, a Server is a machine that can run processes like an Engine or a Web Console. Thus a Server can hold as many Engine as it is possible. A Server can also run a lot of other processes things such Nagios (Machine Monitoring), Postfix (Mail Server), ....

Server vs Service

It is up to you to configure your servers. Anyway, try to separate as much as possible CPU eager processes on different machines (i.e server).

Service Container Overview

We have briefly seen what is a Service Container and what it does contain. Now we will go deeper in that concept by showing you its composition.

Service Detail

Service Container

  • 1 - Service Implementation
  • N - Components
    • N - Components ...
  • N - InBounds
    • N - Components
      • N - Components ...
  • N - OutBounds
    • N - Components
      • N - Components ...

The number in front of each element refers to the number of Items that it can hold. N means unlimited and ... signifies that a Component can contain other N components, ... , etc

This is an architectural view of it. It might look complicated by in reality not all concepts are used. Typically, we would have something like this :

  • InBound : Scheduler for example
    • LogComponent
  • Service Implementation : XXXX
  • Components
    • Log Component
    • Error Component
    • Statistic Component
    • Data Component
  • OutBound : Queue for example
    • LogComponent



Each one of these items is configurable:

  • Service Containers
  • Services Implementation
  • Components
  • InBounds
  • OutBounds

For Java persons, the configuration will be injected into class's fields using setters.

Each element has a namespace. To access to the configuration of an element, you should specify all parent namespace separated with a "." (point). Let’s take an example ; here is a Service defined like this :

Service Container :

  • 1 – InBound (in)
  • 1 – Service Implementation (service)
  • 1 – OutBound (out)
  • 1 – Component Log (log)
    • 1 – Component IO (io)
  • 1 – Component Error (err)
  • 1 – Component Stat (stat)

This is the configuration file :

  • autoStart=false (Injection of the configuration into Service Container)
  • service.max=10 (Injection of the configuration into Service Implementation)
  • in.iteration=10 (Injection of the configuration into InBound)
  • out.queueName=test (Injection of the configuration into OutBoun)
  • (Injection of the configuration into Component Io of Component Log)

In order to facilitate configuration, each Service is contained in a group. Groups are thus a list of services. These groups can share configuration with their Service. A group holds also virtual copies of Services. This is very important concept. Indeed, to facilitate configuration, we realized that we were launching the same groups with almost the same configuration. Now a group can be declined following sets of configurations.

Configuration Definition

Configurations are stored in three different entities :

Data MCD
  • Configuration Group : It has a name and contains Configuration Items.
  • Configuration Item : It has a name and contains Configurations.
  • Configuration : The is the entity that contains the real configuration. A configuration is defined as a key and its value. The value is a String but will be transformed into the right type when a Service Manager will inject it.

Service vs Group vs Configuration

Here are the steps when creating a Service by the Service Manager of each engine :

  • Reading Configuration Item of Runtime Group : We call it A
  • Reading Configuration Group of Runtime Group : We call it B
  • For each Configuration Item of B : We call it C
    • For each Runtime Service : D
      • Merging A, C and Configuration Item of D
      • Loading Service with the merged configuration

We can deduce that a Service is defined with 4 parameters :

  • Server
  • Group Name
  • Service Name
  • Configuration Name : If the group configuration of the Group is empty, then the configuration is "default". Else, it is the name of the Item Configuration of the Group Configuration of the Group.

In Logs, you will see something like servername#serverversion#servicegroup#servicename#configurationname to identify a service.