/AGP

Implementation of a distributed Graph API using Actors

Primary LanguageScalaGNU General Public License v3.0GPL-3.0

AGP (Actor Graph Persistence)

Implementation of a distributed CoreGraph API using PersistentActors:

Akka persistence is a concept that enables stateful actors to persist their state so that it can be recovered when an actor is restarted, this can happen either through a JVM crashing, or a manual stop-start by a supervisor. The key idea behind the implementation is that actors are able to recover the states of the system even after a crash A stateful actor is then recovered by replaying the stored states from the snapshots to the actor, allowing it to rebuild its new state.

How it works

Graph protocol

The CoreGraph adopts the concept of directed relationship to store informamtion between nodes, all edge are discovered through shared informamtion by nodes, the entire graph is seperated into subgrapgh to represent the system. Each subgraph is represented by a PersistenActor which is then controlled by the Orchestrator.

Screenshot 2019-03-17 at 17 59 02

PersistentActor: Is a persistent, stateful actor that is able to persist events and restore actor states after 20 seconds. After which messages are been replayed to that actor so that it can recover its state from these messages.

Screenshot 2019-03-17 at 19 33 37

Serializing a state. Each actors state is been serialized and saved to disk to keep the information from detoying, when an information is desired, is been fetched from the local disk to be replayed to the actors.

Screenshot 2019-03-17 at 17 41 22

Ochestrator is like the master that controls the entire graph, this maintains the mapping between the workers and the subgraphs. The subgraphs represents the part of the entire graph.

Screenshot 2019-03-17 at 17 57 34

Screenshot 2019-03-17 at 17 56 13

How it runs

DGraphApp. This represents the main object that runs the application. When initiated, it creates an instance of the ochestrator, and a number of workers (line 19: 100) depending on the graph size.

Screenshot 2019-03-17 at 19 21 31

Team Members:

BOUBOUH Karim
BOUAYAD Abdelhak
BENTACHFINE Ilyas
ABDULSALAM Yunusa Simpa