Feature Flags are more than just Toggles

  Рет қаралды 10,695

CodeOpinion

CodeOpinion

3 ай бұрын

Feature Flags are just conditional statements but can be much more powerful. Use them so you can integrate features before they are ready to be used in production. But they have a lot more utility than just being simple toggles. Here are different ways of thinking and using feature flags.
🔗 EventStoreDB
eventsto.re/codeopinion
🔔 Subscribe: / @codeopinion
💥 Join this channel to get access to a private Discord Server and any source code in my videos.
🔥 Join via Patreon
/ codeopinion
✔️ Join via KZfaq
/ @codeopinion
📝 Blog: codeopinion.com
👋 Twitter: / codeopinion
✨ LinkedIn: / dcomartin
📧 Weekly Updates: mailchi.mp/63c7a0b3ff38/codeo...

Пікірлер: 21
@georgehelyar
@georgehelyar 3 ай бұрын
Something I've noticed is that there's a distinction between short lived feature flags that are used as part of the CI/CD process to keep master stable and feature flags that determine which features a customer has access to, like product tiers. The CI/CD flags are temporary and need to be cleaned up quickly to reduce tech debt When people confuse the two it can lead to problems
@Jeggettmega
@Jeggettmega Ай бұрын
CI/CD flags are the ones you usually set via env variables?
@brandon995
@brandon995 3 ай бұрын
With some features touching many files (Validator, UI, Service Logic, and Controllers); introducing a feature toggle can be non-trivial. I am considering deploying the new feature without a toggle to a staging server and directing small portions of traffic to the staging server until all users are then using the new feature. Similar to A/B testing and routing traffic to the newer deployment of the app.
@chalequin
@chalequin 3 ай бұрын
Agree I've been in the situation where too many feature flags were disabled but they still exist in code, another kind of tech debt was created I guess
@VerdonTrigance
@VerdonTrigance 3 ай бұрын
Hi. I don't remember if there was a video regarding using DDD in a legacy code, but I wonder how can we jump into legacy project with huge amount of sub-projects and 15 years dependency chain and impement a DDD (with or without CQRS or Event Sourcing). Is there a way how can we define our aggregates and bounding context and pass this smoothly? Or should we throw that idea and do as it always was done all this time before (by making yet another patch/workaround)?
@DevCycleHQ
@DevCycleHQ 11 күн бұрын
They definitely are! (more than just Toggle that is!)
@ColeBreidenbach
@ColeBreidenbach 3 ай бұрын
Just implemented a feature toggle to evaluate two different dates when calculating account expiration dates. Super handy as the feature will only be in our domestic deployment and not our international deployment.
@juststudying1019
@juststudying1019 3 ай бұрын
Amazing channel, thank you. We need a video about authentication and advanced authroization in a microservices event driven architecture please.
@spicynoodle7419
@spicynoodle7419 3 ай бұрын
Authentication seems straightforward, you only do it once on the backend for frontend. Authorization probably needs to be handled by each domain for itself
@juststudying1019
@juststudying1019 3 ай бұрын
@@spicynoodle7419 yep authentication is simple, I have advanced access control Role based and attribute based and access control depending on time, how handling it in each domain will be better ? I thought of a single domain and each service will call that service but it will be slow but i will add cashing even though i think it is not the best idea. And if i will make it as a seperate service absolutely i will not call it via events because i want it to be synchronous so is it best practice to do that in an event driven architecture? Any thoughts on that? I am new to the world of microservices
@CodeOpinion
@CodeOpinion 3 ай бұрын
Authorization is a good suggestion.
@thanasissideridis2801
@thanasissideridis2801 3 ай бұрын
I am currently implementing a custom feature flaging system with dynamic json editor front-end management that syncs the values from db and dynamically caches them for usage, so that the application admins has full access to rollout period and parameters. The most usefull thing that no stakeholder or product owner ever gonna think. Every tech lead in major enterprise workflow should push for a sprint like that.
@wboumans
@wboumans 3 ай бұрын
Doesn't it become a centralised config store at that point? The lines are blurring.
@Jambajakumba
@Jambajakumba 3 ай бұрын
yeah exactly
@FieldsBarnett
@FieldsBarnett 3 ай бұрын
Hey Derek, what do you think of services like LaunchDarkly? It's a great UI with many features for managing feature flags with reactive SDKs for consuming the feature flags, but maybe it isn't the right move to add the outside service dependency for any business critical logic.
@CodeOpinion
@CodeOpinion 3 ай бұрын
It's an interesting problem. I think with any vendor, you kind of have a couple options. One is jump all in and really leverage it to maximize your use of it to really make your system better. Or two, abstract it so you can easily remove it but often losing a lot of the value.
@featbit
@featbit 3 ай бұрын
Hi, my name is FeatBit, it's open source and designed to help people self-host on their own systems. The major difference between me and others is: I highly recommend myself to provide technical support, enabling teams to build their own needed features based on what I offer, and maintain consistency with FeatBit's upgrades."
@combatLaCarie
@combatLaCarie 3 ай бұрын
testing is a nightmare!
@goisenate
@goisenate 3 ай бұрын
First of all, this is a really good channel. I've subscribed to it and enjoyed many vids here. Secondly, I think it's worth pointing out that there are also other ways to improve on his approach by utilizing better code design. As he says, in their basic and "naive" form, feature flags can be seen as (1) "if/else" conditions in the application with (2) an effective way to specify which conditional path to go by means of some kind of configuration elsewhere. Now, "if/else" conditions have implications on CNN and OCP: CNN: Every additional condition in your code adds to the CNN (Cyclomatic Complexity Number), i.e. your code will be MEASURABLY more complex. OCP: If you have to change the existing code to insert the feature flag conditional then you're violating the OCP (Open Closed Principle which is the "O" in S.O.L.I.D.). Therefore I try other techniques first and insert conditionals only if I have no other realistic option: 1) One of his examples is a feature flag to turn on/off a cache or select which cache to use. Caches are a textbook example of the DECORATOR pattern. This allows to wrap the data provider transparently into a surrounding implementation which can then function as a cache. No implementation code needs to be changed for this to happen. The only thing left to do is the configuration part. There you MIGHT need a conditional for the factory that wraps one into the other. However, you may also leverage your Dependency Injection (DI) container or use annotations and/or AOP tooling for this. 2) Another way to create a feature flag would be to use good old polymorphism. Your feature is then a new implementation of the "thing" it is being swapped for. If, instead, your feature is not REPLACING anything existing but is ADDITIONAL functionality then put the functionalities (old and new) into a list and iterate over the list. The configuration will decide whether to put the new feature in or not, which makes it, in effect, a feature flag toggle. The rest is how you configure which implementation is to be used where or added to the list of features. This is typically the job of a DI container or similar mechanisms. (I think Derek is kind of thinking this direction in his second example about the "tenant". However, his example still interprets a boolean to change the app's behavior. My approach on the other hand specifies the concrete implementation class to be used or not, i.e. the is no need to interpret anything thus keeping the CNN from growing.) Sometimes, this requires existing code to be refactored first so that the pieces can be separated by polymorphic implementations. If the effort and/or risk for this effort is too high I do admit that we may end up with the traditional if/else conditionals instead.
@TheHegi
@TheHegi 3 ай бұрын
I don't think long-term toggles should be called Feature-Flags. The problem is that if you have a feature-flag in the system, then during testing you'll need to check all combination to ensure that your system works as expected. If a flag in production never changes it's value after a rollout, then said flag needs to be removed. Then you end up having these nested dependencies that flag X only works if feature Y is on etc. #IMO it's a lot cleaner if one doesn't mix short lived feature flags with long term values for configuration. So if different deployments support different caches (to stick with the example) then said cache should be configured via a different source then feature flags. (Also if a feature gets released and needs to be supported in the long run, then said flag should be migrated over to this other location) Also long term configs tent to resemble a hierarchy while short lived flags are usually flat. I've seen deployments with 680+ feature flags still in the system. Now good luck testing that...
My WORST Mistakes as a Software Developer
7:52
CodeOpinion
Рет қаралды 9 М.
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 16 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 68 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 10 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 15 МЛН
Keep your project structure simple!
15:08
CodeOpinion
Рет қаралды 16 М.
Releasing Features the Smart Way in .NET
15:28
Nick Chapsas
Рет қаралды 48 М.
Dependency Injection | Prime Reacts
28:34
ThePrimeTime
Рет қаралды 305 М.
Goodbye long procedural code! Fix it with workflows
9:05
CodeOpinion
Рет қаралды 22 М.
Event-Driven Architecture lost its way
8:44
CodeOpinion
Рет қаралды 52 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 153 М.
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 198 М.
Debunking Kafka Top 5 Use Cases
10:02
CodeOpinion
Рет қаралды 14 М.
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 49 МЛН
Samsung Galaxy Unpacked July 2024: Official Replay
1:8:53
Samsung
Рет қаралды 23 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,7 МЛН
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 307 М.
Первый обзор Galaxy Z Fold 6
12:23
Rozetked
Рет қаралды 438 М.