Chiselstore: an embeddable, distributed SQLite for Rust
github.com
github.com
on a 2nd note, each method should have it's own Request Response, and ideally they should be suffixed same way. Returning same proto for multiple methods might break future compatibility - e.g. what if AppendEntries needs to return somehing else than Void? - ideally you make it from the start to return an empty AppendEntriesResponse, and then you can extend that proto.
https://developers.google.com/protocol-buffers/docs/proto3#u...
(edit again, also the package should not be called just "proto")
How would you use this to perform a transaction, or at minimum a compare-and-swap operation against a row? There doesn't seem to be any binding between a client and a connection for you to implement transactions here.
All changes to the database would then be propagated through Raft using a commit log, which would be read and accepted by follower nodes. This is also reinforced by the fact, that nondeterministic operations are supported.
Thus, everything around transactions and CAS's will work the same as it normally does, as it executes on the leader.
Systems like Chiselstore and dqlite operate at a different architectural layer, so can offer transaction support. But require more programming to use. It's a trade off.
[Edit] The only thing that'd be different for Rust and/or C is the avoidance of "stop-the-world" GC pauses, which affect Java more, but are still present in Golang.
https://glaubercosta-11125.medium.com/728187331f53
It also mentions rqlite and dqlite.