Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 2.11 KB

Actors.EN.md

File metadata and controls

48 lines (36 loc) · 2.11 KB

Multithreading support

SynapseGrid has a perfect integration with the awesome Akka library. (I'd like to acknowledge Jonas Bonér that created this library and Martin Odersky for the brilliant Scala language.)

System capabilities (SynapseGrid)

  1. Parallel data processing
  2. Explicit declaration, which subsystems will be executed in separate actor.

System capabilities (Akka Actor system pov)

  1. System structure observation, via autogenerated Dot-graphs
  2. Multiinput actors.
  3. Actor's output data..

On schedule

  1. Exception processing strategy,
  2. Actor/subsystem pool

Akka Actors usage

All, described above, systems are single-threaded. There are also many possible ways to achieve multithreading. One of them – create an actor-based system, that will be fully compatible with Akka. When Actor receives a Signal message, then it will be proceed in the most obvious way: signal will be sent next to embedded DynamicSystem.

The NonSignalWithSenderInput contact can be used for compatibility with programs, which doesn't support Signals. This contact has (ActorRef, Any) type. It's first element will contain received data sender, the second – data..

Distributed systems deployment

A static system can be deployed either on a single node, or over a few interconnected nodes (cluster).

Of course we can create a few separate systems for each of the nodes and then link the systems via embedded actor's mechanism. However, this apporach prevents uniform description, compile-time checking, static system's structure analysis.

That's why it seems better to have a single Static system in which a few subsystems have been moved to other hosts. First of all we need to have identical instances of StaticSystem at every host. Then, we need a uniform descriptor for where each subsystem should go. When we start a runtime system, we also need to know, which host we are currently run. Then we create and publish only those subsystems that belong to the host.