6 ms·
Never underestimate the power of a zero-network-hop abstraction over f(feature_name, context). And context can be extremely tailored to your niche: specific in
by btown 4mo ago
Never underestimate the power of a zero-network-hop abstraction over f(feature_name, context).
And context can be extremely tailored to your niche: specific inventory, from a specific supplier, for a specific user of a specific B2B client of a specific business model subtype, who should or shouldn’t see certain features on that specific inventory at certain times.
When you can write your own logic, and just run this in a tight loop as easily and performantly as you can use a constant, it makes your business incredibly agile. Think some text might change for some customers? Just write the code to make it configurable, and you get tests and flags for free.
Sadly, that zero-hop setup requires a sophisticated client execution engine, which it doesn’t appear Cloudflare has implemented here. Makes sense for their memory constrained workers, less sense for traditional infrastructure.
Statsig has an approach here that I quite like:
> To be able to do this, Server SDKs hold the entire ruleset of your project in memory - a representation of each gate or experiment in JSON. On client SDKs, we evaluate all of the gates/experiments when you call initialize - on our servers.
https://docs.statsig.com/sdks/how-evaluation-works https://docs.statsig.com/sdks/how-evaluation-works
You can also roll your own - just sync your rulesets to a few data structures every few seconds in a background thread and atomically swap the reference to them. Then you just need a CRUD interface over the applicability ruleset dimensions.
Just be careful to have governance on who can play with which would-be constants. Great power and great responsibility and all that!
- chrisweekly 4mo agoGood advice. I'll add a protip / reminder that feature flags, AB tests, and entitlements are three distinct concepts. This blog post (no affiliation) has framing I found helpful: https://www.stigg.io/blog-posts/entitlements-untangled-the-modern-way-to-software-monetization https://www.stigg.io/blog-posts/entitlements-untangled-the-m...
- BatteryMountain 4mo agoAmazing resource, thanks!
- Ayush_Khati1 4mo ago[flagged]
- swyx 4mo ago> Sadly, that zero-hop setup requires a sophisticated client execution engine, which it doesn’t appear Cloudflare has implemented here. Makes sense for their memory constrained workers, less sense for traditional infrastructure. wait what? what kind of logic do you need to do that CF Workers can't do?
- rustystump 4mo agoCould you be more specific?
- hobofan 4mo ago> Sadly, that zero-hop setup requires a sophisticated client execution engine, which it doesn’t appear Cloudflare has implemented here. It doesn't have to be sophisticated and they don't need to implement it themselves. They piggy-back on OpenFeature where the client libraries have a simple targeting rule evaluation engine integrated.
- ZeWaka 4mo agoStatsig has worked great at my work, really polished and rich feature set. Their tooling to identify unused flags as candidates for removal is neat. The per-seat billing we have in our agreement is a bit rough but it's workable.
- pil0u 4mo agoStatsig is a half-baked product bought out by OpenAI for data harvesting. We already reported 2 documentation issues and 1 critical technical issue, and we're barely using it.
- iancarroll 4mo agoWell, OpenAI already sold it (but kept the team), so it’s in someone else’s hands now.
- la_fayette 4mo agoWhen reading your comment, it just reminds me on how feature flags can be misused as application configuration/customization. An antipattern i could observe at various organzations already. For me feature flags go along with trunk based development to enable features in QA settings, but not on PROD yet, for PO/PM testing. Trunk based development allows for fast/easy devops, without complicated branching strategies. Application configuration is, for me, part of the application and has the business context for customizing the application accordingly. Not sure if there are specific frameworks/tools out there. But one should clearly distinguish these two.
- epolanski 4mo ago> it just reminds me on how feature flags can be misused as application configuration/customization They literally are configuration.
- tedk-42 4mo agoOh yeah lets make a web request per service invocation to figure out what to serve for the invocation! Guys this is exactly the kind of banal crap that makes a simple app into a monsterous beast that won't work unless it's connected to the internet.
- epolanski 4mo agoThere's no web request per service invocation. Feature flags are set once at startup (or specific events like hard refresh, or new login) and then simply included in the request headers. It's not rocket science, but I'm sure people are free to overcomplicate it.
- tedk-42 4mo agoThat's not a feature flagging service then (config as a service! not a thing really...) I've done both client and server side implementations of the launch darkly sdk and that's how it's done to know client context. If you're initialising the entire SDK only to load 1 set of configuration items, I'd argue you can host the config as a json file on a CDN and be done with it - feature flagging is overkill.
- julik 4mo agoWhich is not hard to do (it is a modulo over a mersenne twister or something similar), but in my recent gigs just Flipper with optional "state of the flags table as of now" endpoint was more than enough. That modulo+random combo required tools like LaunchDarkly to ship SDKs in several languages, and the ones I had to work with were just plain horrible fit for their language of choice. But because the evaluation was relegated to the edge, the whole system got way more complex than desirable. In actuality, I think a refetch of the current flags table "for this customer" every so often is just fine, and way less of a nuisance. So glad Flipper exists and I don't have to deal with this stuff anymore.
- bobthepanda 4mo agowhich Flipper is this?
- julik 4mo agohttps://github.com/flippercloud/flipper https://github.com/flippercloud/flipper
- cornholio 4mo agoBut why would you wrap some proprietary solution around your neck instead of rolling your own custom solution or extending some open source? The answer for most things pertaining to encloudification seems to be "because it's easy and we are already using cloud provider X". Death by a thousand clickops.