Releases: relab/gorums
Rename non-generated Manager, Node and Configuration structs
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
.
Fixes minor issues found by Go Report Card
This release mainly fixes some lint issues found by Go Report Card.
- Issues were mainly missing comments for public variables and functions
- In addition, this also reduces some complexity in the different call types and the benchmarking tool
Add custom ServerCtx with Release() method
Simplifies the server API by moving the release() function into a special context object ServerCtx.
Avoid reusing mutex for multiple streams.
Fixed Correctable streams.
incompatible changes
requestHandler: changed from func(context.Context, *Message, chan<- *Message) to func(ServerCtx, *Message, chan<- *Message)
compatible changes
(*Node).Host: added
SendMessage: added
ServerCtx: added
Refactor Node and other simplifications
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.
Revised NewConfiguration API and more
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:
- Replaced deprecated
golang.org/x/tools/go/loader
withgolang.org/x/tools/go/packages
ingorums_bundle.go
for a significant speed boost. - Fixed bug in dependency handling due to missing generated files.
- Improved version handling.
- Upgraded all dependencies to the most recent version and tested.
- Documentation and user guides have been updated
Major overhaul of Manager vs Configuration API and much more
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.
Pre-merge rewrite of generator architecture
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).
Bug fixes and more
See the commit logs for details...
First pre-release after rewrite to use v2 protobuf API
added benchmark for the receiveQueue To run this benchmark: go test -bench=BenchmarkReceiveQueue Results on my machine are pretty conclusive: BenchmarkReceiveQueue/RWMutexMap-12 13286848 77.7 ns/op BenchmarkReceiveQueue/syncMapStruct-12 2467936 482 ns/op BenchmarkReceiveQueue/syncMapDirect-12 2494368 485 ns/op