The goal of the project is to provide an efficient Chord distributed hash table implementation in Scala using Akka framework
There are two modules: core and monitor
The core module provides implementation of the service which should be running on every peer.
The routing/messaging implementation is based on the architecture described in the Chord paper.
Leaderless replication is performed where quorum reads and writes are required for them to be successful. Writes/Reads are performed on the whole successor list
monitor module provides a dht status monitor webserver which provides a REST API for the nodes to call in order to register their current status in the system. Browser-based fronted demonstrates Chord stabilization process real-time. In case a node doesn't send any data withing a time interval (10 seconds), a node is considered dead (for monitor, not for the peers, for the peers heartbeat mechanism detect whether or not peer is dead or alive)
Currently in order to start the demo you need to run both modules:
- the
Main.scala
from the core module, which itself create multiple peer instances that join through a particular node and - the
WebServer.scala
from the monitor module which start the dht status monitor webserver.
The latest version of the monitor is available at http://dht-monitor.herokuapp.com/websocket.html
html/js frontend is shamelessly taken from this repo