Distributed Systems Toolkit for Rust

Name: Alec Embke
Affiliation: Azuqua
E-mail: alec@azuqua.com
Website: https://www.azuqua.com
Knowledge Required: Distributed Systems Fundamentals, including: Consistent Hashing, Vector, Clocks, Gossip Protocols, Distributed Locking.

Rust and/or C/C++ Experience.
Functional Programming Experience.
Deep understanding of networking fundamentals.
Familiarity with event-driven programming via an event loop.
At Azuqua we provide a visual workflow interface for users to connect different online services together. These workflows, or "flos", are formally described as programs inside the Azuqua system. One of the microservices that powers the Azuqua runtime environment (the "engine") requires managing stateful resources on behalf of users such as TCP connections to external services, stateful data sets, etc.

These resources typically have a lot of inertia. Moving large data sets between virtual machines is expensive to do often, as is tearing down and rebuilding TCP connections to external services. However, in order to scale this system it must be able to scale horizontally such that as more virtual machines are added to the system performance and capacity scale linearly, or hopefully somewhat linearly. This creates a problem: how to create a system that can quickly scale by adding more resources to a cluster, but do so without requiring that the entire cluster or data set be rebalanced every time more resources are added.

The goal of this project is to create a general purpose, open source (Apache v2 license) toolkit for creating fully-connected, stateful distributed systems in Rust. This toolkit will provide the means for application developers to create horizontally-scaled applications that can discover each other on the network, detect network partitions, efficiently distribute and rebalance resources among nodes in a cluster, and much more. If you have experience with the Erlang ecosystem, a good analogy for this project is building a subset of OTP.

Rust is still quite a young language, and as a result there are many opportunities to fill gaps in the ecosystem and help expand the community. At the time of writing there does not exist a very well maintained, standardized way of building distributed systems in Rust. This library represents a unique opportunity to hopefully create a standardized way of building certain kinds of distributed systems in Rust.

Azuqua currently has an existing open source implementation of this library in JavaScript (https://github.com/azuqua/clusterluck) and can provide specs and a reference implementation based on that. Additionally, at the end of the project Azuqua will use this to build new features, and as a result plans to adopt the library and maintain it going forward under the same Apache v2 license. Azuqua can also provide hosting for CICD processes, documentation, development resources, etc, during and after the initial development phase.
Description: A robust, general purpose, open source library for building fully-connected distributed systems in Rust.
Objectives: Produce a robust, open source library for building fully-connected distributed systems in Rust.
Deliverables: A Rust library with the following features.

* Support for service discovery over a network.
* Support for application instances to communicate via an authenticated TCP connection.
* A general purpose RPC interface.
* A CLI library for managing a cluster of nodes via a command line interface.
* Support for building and managing consistent hash rings.
* General purpose support for vector clocks.
* An interface for distributed locking, both with mutexes and semaphores.
* A generic, distributed HashMap.
* An interface friendly to applications using the Actor model.

Additional features, if time allows.

* A generic, distributed queue.
* Optionally persistent variants of the distributed table and queue data structures.
* A front end web interface for interacting with a cluster.
* Anything else provided by OTP that sounds interesting.
Other comments:

   D. Kevin McGrath
   Last modified: Tue Mar 6 10:29:08 2018