A prototype for per-contract sharding. At its core, huxiang is a library for functorially defined communicating state machines over TCP. The core feature is the coalescent product construction, which allows to compute a process acting as an interpreter for the asynchronous product of several processes executing a distributed monitoring protocol (the "replica" protocol).
For now, this code should certainly not be used for purposes beyond
experimenting. The library provides a functor Node.Make
parameterized by a
"process". A process specifies
1) which messages can be sent and received, and
2) a transition function from input to outputs.
Given a module of type Process
, the Node.Make
functor returns a module
for deploying an actual network node, ready to communicate and implement
the transition function.
The replica construction corresponds to the Replica.Make
functor.