All Projects → tristanpenman → chordial

tristanpenman / chordial

Licence: BSD-3-Clause license
A simple Scala implementation of Chord, a distributed lookup protocol

Programming Languages

javascript
184084 projects - #8 most used programming language
scala
5932 projects
Vue
7211 projects

Labels

Projects that are alternatives of or similar to chordial

lila-ws
Lichess' websocket server
Stars: ✭ 99 (+312.5%)
Mutual labels:  akka
alpakka-samples
Example projects building Reactive Integrations using Alpakka
Stars: ✭ 61 (+154.17%)
Mutual labels:  akka
akka-persistence-gcp-datastore
akka-persistence-gcp-datastore is a journal and snapshot store plugin for akka-persistence using google cloud firestore in datastore mode.
Stars: ✭ 18 (-25%)
Mutual labels:  akka
akka-contextual-actor
A really small library (just a few classes) which lets you trace your actors messages transparently propagating a common context together with your messages and adding the specified values to the MDC of the underlying logging framework.
Stars: ✭ 17 (-29.17%)
Mutual labels:  akka
Chord-Draw
Draw guitar chord diagrams for all variations of any chord and also display finger positions etc.
Stars: ✭ 17 (-29.17%)
Mutual labels:  chord
khermes
A distributed fake data generator based in Akka.
Stars: ✭ 94 (+291.67%)
Mutual labels:  akka
Chordly
Chordly is a javascript library that may be used to detect and act upon key sequences entered by a user.
Stars: ✭ 14 (-41.67%)
Mutual labels:  chord
wasp
WASP is a framework to build complex real time big data applications. It relies on a kind of Kappa/Lambda architecture mainly leveraging Kafka and Spark. If you need to ingest huge amount of heterogeneous data and analyze them through complex pipelines, this is the framework for you.
Stars: ✭ 19 (-20.83%)
Mutual labels:  akka
slicebox
Microservice for safe sharing and easy access to medical images
Stars: ✭ 18 (-25%)
Mutual labels:  akka
akka-doc-ja
Akka Japanese Documentation
Stars: ✭ 25 (+4.17%)
Mutual labels:  akka
akka-stream-mon
Throughput and latency monitoring for Akka Streams
Stars: ✭ 23 (-4.17%)
Mutual labels:  akka
akka-cookbook
提供清晰、实用的Akka应用指导
Stars: ✭ 30 (+25%)
Mutual labels:  akka
scala-akka
OpenTracing instrumentation for Scala Akka
Stars: ✭ 16 (-33.33%)
Mutual labels:  akka
protoactor-python
Proto Actor - Ultra fast distributed actors
Stars: ✭ 78 (+225%)
Mutual labels:  akka
akka-jwt
Library for jwt authentication with akka
Stars: ✭ 16 (-33.33%)
Mutual labels:  akka
ainterface
Runs an Erlang node on an ActorSystem of Akka.
Stars: ✭ 44 (+83.33%)
Mutual labels:  akka
akka-pusher
Pusher meets Akka
Stars: ✭ 18 (-25%)
Mutual labels:  akka
changestream
A stream of changes for MySQL built on Akka
Stars: ✭ 25 (+4.17%)
Mutual labels:  akka
scala-zen
Scala Zen
Stars: ✭ 29 (+20.83%)
Mutual labels:  akka
akka-ui
AkkaUI - Build your reactive UI using Akka.js
Stars: ✭ 55 (+129.17%)
Mutual labels:  akka

Chordial

This project aims to provide a simple Scala implementation of Chord, a protocol and algorithm for a peer-to-peer distributed hash table.

It is intended for education purposes, and to better understand the Scala ecosystem.

Modules

This repo currently contains the following modules:

  • core - core classes and algorithms that make up the Chord implementation
  • demo - a simple websocket-based demo, which allows a Chord network to be visualised on a ring
  • dht - a minimal Distributed Hash Table (DHT) based on the classes provided by core

Core

The core module is being developed as a reusable Chord library, responsible for maintaining a node's location within a Chord overlay network. This approach, which is based on the protocol described in the Chord paper, allows the Chord network overlay layer to function independently of application-layer concerns such as replication.

Demo

The demo module is a single server demo application that can be used to experiment with Chord's network overlay concepts. It provides an RESTful interface for creating nodes, and a browser-based frontend for visualising a Chord ring.

DHT

The dht module implements a simple distributed hash table based on Chord. Note: This is a work in progress.

Running the Demo

To start the demo server using SBT:

sbt "demo/runMain com.tristanpenman.chordial.demo.Demo"

Once the server has started, the browser-based interface should be accessible via http://127.0.0.1:4567. This page opens a WebSocket connection to the server, and will be updated with nodes and lines representing their successor relationships as they are added to the network.

Initially, the network will be empty:

Chord Demo

You can click the 'Add Node' button to add new nodes to network.

Alternatively, nodes can be created via POST requests to the http://127.0.0.1:4567/nodes endpoint. Using cURL, you could create a new node like so:

curl -XPOST -w"\n" http://127.0.0.1:4567/nodes

This would create a new seed node. The response will contain a JSON representation of the new node:

{"nodeId":6,"successorId":6,"active":true}

Although this demo allows you to create multiple independent Chord networks within the same keyspace, you will generally want to create nodes that join an existing network. To create a node that is connected to an existing network, you can specify an existing node as a seed ID. For example:

curl -XPOST -w"\n" http://127.0.0.1:4567/nodes?seed_id=6

After several node insertions, you will end up with a visualisation similar to this:

Chord Demo

The list of all existing nodes can be retrieved via a GET request:

curl -XGET -w"\n" http://127.0.0.1:4567/nodes

This will return a JSON array, where each element represents a node:

[{"nodeId":6,"successorId":59,"active":true}, {"nodeId":59,"successorId":6,"active":true}]

Test Suite

Chordial includes a basic test suite (growing all the time!), which can be run via SBT:

sbt test

License

This project is licensed under the Simplified BSD License. See the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].