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.
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.
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.
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.
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.
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.
BOUBOUH Karim
BOUAYAD Abdelhak
BENTACHFINE Ilyas
ABDULSALAM Yunusa Simpa