User Tools

Site Tools


N2S3's Architecture

N2S3 and Akka Actors

Simulations in N2S3 are organized as a set of actors from the akka library, an implementation of the actor model. This actor model is a concurrency model that proposes that concurrency is managed actors: objects that encapsulate their internal state and communicate via asynchronous message passing. That is, an object sends a message to another object but it does not block waiting for an answer. This model has the following main properties:

  • Avoids deadlocks naturally since messages do not block waiting for an answer. Answers can then be modeled as separate messages.
  • Concurrent access to data/actor state is controlled by the actor and serialized by the actor's execution. An actor processes at most a single message per unit of time.

This allows actors to be executed in parallel with not much constraints.

While communications between actors is asynchronous, within an actor a program executes in the usual sequential manner of a scala program.

This model was chosen for N2S3 since it has good scalability and distribution properties that can be applied to a neural network.

The Simulation Deployment Stages

Deploying a N2S3 simulation takes several steps. This happens because users configure a neural network, but that neural network may be deployed in the same or different actors, in the same or different machines. A summary of these stages is as follows:

As you can see, a simulation has four main steps:

  1. Configuring the simulation. This configuration may happen as the manipulation of simulation objects via a script of via the description of the simulation through a more declarative configuration language. This part of N2S3 does need some work yet to simplify the creation of simulations.
  2. Creating a Model of the Neural Network. This step consists in interpreting the simulation configuration and create a model of it. This model will contain e.g., entities representing the different groups of the neural network and their connections.
  3. Creating a Deployment model for the Neural Network. Given a neural network model and a deployment strategy the simulation decides how actors should be organized inside a cluster. For example, the simulation may decide to deploy several elements of the simulation in the same machine to minimize communication overheads because of their relation, or decide to separate not-communicating sub-nets to maximize the parallelism. This part of N2S3 is in the current version collapsed in a single step with the next one, the deployment.
  4. Deployment. Taking a deployment model, the actors of the simulation are deployed in the specified machines, and connected as expected following the neural network model.

The rest of the documentation is organized from this topics. If you're willing to contribute we recommend you read them in the proposed order (from concrete to abstract) as follows:

Other topics:

architecture.txt ยท Last modified: 2016/10/21 11:40 by