Part 1 : Project Architecture



A Swarm is composed of several of many Daemon which can exchange data together. Data can be raw data, configuration and specific action proper to the Daemon such as STOP.

Each Daemon has its own address and port.

Communication patern is based on data pushing. Each Daemon pushes data to the desired receiver, as figure 1 shows.
nothing

Figure 1 : Global swarm usage. Each Daemon pushes data to the desired one.



Then, since a Daemon can manage as many data type as needed. Each Daemon has an internal scheduler to choose the proper method to treat data based on their type name, as figure 2 shows.
nothing

Figure 2 : The internal switch in a Daemon called the proper method based on the type name of the input data.



The project PhoenixSwarm is based on backends to ensure developers can choose the best one for their need. These backends provides :
  • Socket for the communication between Daemon of the Swarm
  • Clock to compute latencies between Daemon of the Swarm


In order to simplify development, these backends of Socket and Clock can choose between two other backends :
  • The official backend of the production (unix socket, zmq, netmq, etc). And you can also add your own backends which suite your needs
  • The mock backend which simplifies the units tests and allow to perform them without any latency or with a customizable latency
Part 3 show how to define and use backends inside a Swarm Daemon.