Comments (4)
As I mentioned in the last meeting, I think we did have the function argument approach in an early version of Gorums. Maybe @leandernikolaus and @tormoder can help me confirm this; I looked at the code, but couldn't find any residue of this code.
I do think that our rational back then was that the qspec would then be decoupled from the caller's code; that is, the developer could think about making quorum calls and getting a single reply back and wouldn't have to see the actual quorum function as part of the execution path.
I think we also discussed back then whether or not to support both alternatives, and opted to pick just one approach for simplicity.
Any thoughts: @hanish520 @r0qs and others...
from gorums.
I guess the question is whether or not a qspec belongs together with the configuration object. You could argue that the function argument approach can still be decoupled from the quorum call execution path by defining it outside the code path and just pass it as an argument; e.g., we could have a library of standard quorum functions that you pass in. But in this case, you cannot leverage the locally defined variables inside the quorum function.
from gorums.
I always thought of a quorum function and qspec as belonging to the configuration, rather than to a specific call.
Thus, I find it reasonable, if you want to use different qspecs, to rather use different configurations than passing different
I am unsure whether this is actually possible in the current gorums.
The disadvantage with qspecs, is that someone may actually modify state in these objects, which could be problematic and not thread safe.
from gorums.
I'm closing this since there is no clear use case for the function closure approach. Should a use case arise, we can revisit the topic.
from gorums.
Related Issues (20)
- Decouple Node from channel to avoid two-way reference HOT 2
- Improve release automation with goreleaser
- Replace deprecated grpc.WithInsecure()
- Provide timeout and retry options to the NewConfiguration method
- Configurable network latencies in the configuration HOT 2
- Update user-guide.md to link to method-options.md
- feat: generic datatype for node ID HOT 1
- bug: RawNode.RPCCall returns nil instead of error
- ci: Update GitHub Actions versions to fix failing CI workflows
- deps: upgrade golang and dependency versions
- doc: gorums.NewServer claims to be for internal use
- thinking: Consider whether or not to use the WithBlock dial option HOT 1
- fix: rework the context object in gRPC calls HOT 1
- feat: Generate ServiceNameClient interface akin to gRPC's plugin
- chore: rename channel.sendMsgs
- Add example projects mainly as documentation of Gorums features
- bug: race condition when accessing configuration from separate goroutines HOT 2
- chore: update errors to follow better style and use the %w verb HOT 1
- bug: incorrect unblock behavior when using `WithNoSendWaiting` call option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gorums.