Giter Site home page Giter Site logo

Comments (4)

meling avatar meling commented on June 2, 2024

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.

meling avatar meling commented on June 2, 2024

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.

leandernikolaus avatar leandernikolaus commented on June 2, 2024

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.

meling avatar meling commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.