Coder Social home page Coder Social logo

Comments (5)

justinabrahms avatar justinabrahms commented on May 29, 2024 1

I was actually thinking of a world where we had multiple clients, one for each provider. This would allow me to have a config-backed provider and a service-backed one. I might also have a single aggregate provider, but would need to do something w/ FlagEvalOptions to make it work.

Would love to better understand the use-case you're seeing w/ updating the provider to be different and have it reflect in existing clients.

from spec.

toddbaert avatar toddbaert commented on May 29, 2024 1

@justinabrahms

Thinking about what you wanted more, I think one (possibly nice) way to do that would be to utilize "namespaced" providers...

Basically, we'd add an optional namespace param to the setProvider() call:

OpenFeature.setProvider(new MyGlobalProvider()) // general provider

OpenFeature.setProvider(new MySpecificProvider(), "admin-pages") // admin-pages represents one logical section of some app that wants to use a different feature-flag control plane than the rest of the app

then:

OpenFeature.getClient({  nameSpace: "admin-pages" }) // returns a client associated with MySpecificProvider

Does this make sense? I think this makes the behavior pretty clear, the implementation would be very straightforward (maintain a single map of providers with keys being the namespace), it doesn't complicate basic use cases, and I think it supports your goal.

cc @beeme1mr

from spec.

toddbaert avatar toddbaert commented on May 29, 2024

I think this discussion might merit a meeting, either during our standing one, or something dedicated.

from spec.

justinabrahms avatar justinabrahms commented on May 29, 2024

I think I like that. My preference is we leave this ticket open until post-alpha bc this doesn't seem necessary to hit that goal and I want a stable spec to shoot for. :)

Or maybe we tag an alpha spec that I can work towards.

from spec.

toddbaert avatar toddbaert commented on May 29, 2024

I'm going to close this now, and we can revive it if it comes up again... I think it's a bit of an edge case.

from spec.

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.