Comments (5)
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.
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.
I think this discussion might merit a meeting, either during our standing one, or something dedicated.
from spec.
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.
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)
- Support in spec for closure/shutdown HOT 6
- Hook evaluation specification clarity HOT 14
- Amend provider's reasons to include static & cached
- First class client-side support in OpenFeature spec HOT 2
- Document the difference between ResolutionDetails and EvaluationDetails HOT 1
- Release Version 0.5.2
- Return value and `after` stage errors HOT 18
- Draft and merge client-side specification
- Perform vendor survey to better understand SDK paradigms HOT 1
- Dart/Flutter SDK HOT 11
- Spec styling and consistency issues
- [Question] `API.shutdown()` required in Go? HOT 5
- [Question] Static vs Dynamic context terminology HOT 1
- [bug] Multiple providers bound to one "name", and associated issues HOT 11
- Spec could be more clear about named-client/provider binding. Would "namespace" help? HOT 6
- Provider Initialization Fallback HOT 4
- Consider 0.7.0 release HOT 1
- Specify provider state after `shutdown()` HOT 8
- [Static-context Paradigm] How to handle errors in `on context changed` HOT 2
- Any plans to create feature flag code management project? HOT 5
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 spec.