The plan is to provide traits for a Transport, Machine, and Storage which can be passed to a Node instance which then manages the state of the machine over the transport on the storage.
Further crates will later provide implementations for e.g. a TCPTransport or a HashMapMachine.
The project can be found on github:
But don't expect too much yet, it's still WIP... 😉 🦀
Today I worked on a new Machine trait for my raft Node. The new trait introduces the possibility to store and read state from the machine.
This was previously only possible through the node itself and very unhandy. The machine can now be accessed on the same thread where the node was created.
I was able to do this without using any locks (Mutex, etc.). All inter-thread communication is done with channels so far.
However, the implementation is currently very slow. All operations on the machine are blocking for now and lead to the whole cluster processing only one state change per tick (100ms).
This can be changed by introducing an asynchronous API, which will be implemented later.
The overall performance is now a lot better. However, writes are still quite slow, although I managed to track the problem down to the raft-rs implementation.
Additionally, the raft cluster is crashing and getting very slow when doing many state-change proposals at once.
I think it is now time to look again into properly implementing the ready state processing. Currently it is quite hacky and likely the source of all my raft related problems :D
You can follow development on github: https://github.com/fin-ger/simple-raft-node
The project runs on rust-nightly only.
I continued development of my raft-node implementation in #rust and finally finished introducing TCP transports!
However, the implementation still contains some hacks and is definitely unstable.
A working TCP transport can be found under examples/tcp.rs on github:
After finishing my raft-node prototype I will move on scratching up a distributed #WAMP router based on that raft-node.
The router will support only publish/subscribe for now. The complete core profile will be eventually implemented when vertical prototyping is finished.
Also, the projects involved into this prototyping lack all kinds of documentation. Documenting and cleaning up the code base of all these projects will be number one priority after prototyping the WAMP-router.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!