Gorums simplify fault-tolerant quorum-based protocols
This release changes the names of the non-generated Manager
, Node
and Configuration
structs to RawManager
, RawNode
, and RawConfiguration
in order to better differentiate them from the generated versions.
This release also adds a generated ConfigurationFromRaw
function that can be used to create a configuration from an existing RawConfiguration
.
This release mainly fixes some lint issues found by Go Report Card.
Simplifies the server API by moving the release() function into a special context object ServerCtx.
Avoid reusing mutex for multiple streams.
Fixed Correctable streams.
requestHandler: changed from func(context.Context, *Message, chan<- *Message) to func(ServerCtx, *Message, chan<- *Message)
(*Node).Host: added SendMessage: added ServerCtx: added
This release is mainly refactoring and renaming some types. Node now uses a new channel abstraction in place of the orderedNodeStream, and does away with receiveQueue and makes other simplifications. Also Node decouples better from channel, making it easier to test both individually. The channel abstraction may be expanded in the future to allow multiple channels per node.
This release includes a revised API for creating new configurations via Manager.NewConfiguration() that allows QuorumSpec
and NodeListOption
types be added in any order. The release also allows to create a configuration with additional nodes via Configuration.WithNewNodes
and excluded via Configuration.Without
, and there is also Configuration.And
and Configuration.Except
that operates on Configuration
objects.
Other changes:
golang.org/x/tools/go/loader
with golang.org/x/tools/go/packages
in gorums_bundle.go
for a significant speed boost.This pre-release is a major overhaul the Manager vs Configuration API; the WithNodeList
, WithNodeMap
and WithNodeIDs
have been moved out of Manager and now is passed to Configuration at creation time. Further, what needs to be generated has been reduced even further, moving more logic to the top-level gorums package. Also, less info needs to be passed to the various call types (Call Data). Further, the documentation has been updated. The unused gorums.ordered
option has been removed. Fixes an with PerNodeArgFunc and adds proper tests for this. And much more. See the commit messages and PR descriptions for additional details.
This pre-release is just to put a stick in the ground for the current state of the codebase pre merging the new generator architecture that has significantly less generated code (and thus should have smaller binaries).
See the commit logs for details...