0

Looking at LaunchDarkly for feature flagging across our enterprise apps.

Two questions:

1) I'm concerned about being able to effectively flag features across our Java back end and React front ends (2 of them). What are some strategies that people use to define features appropriately so that they are easy to manage across multiple applications/platforms?

2) Have you replaced most/all of your git / Bitbucket / ?? branching workflow with feature flags and purely trunk - based development? If not, have you made significant changes to your existing git / Bitbucket branching strategy?

Wes Gamble
  • 777
  • 10
  • 29

2 Answers2

1

Disclamer: I work at DevCycle

I'm a few years late, but, I really wanted to make sure anyone finding their way to this question has a little more information.

1) While levlaz provided an answer explaining that you should put your management as far up the stack as possible, I don't necessarily agree that this is the best approach to consider first.

Consider this: A simple setup of a single feature across multiple platforms

Within DevCycle (and others), when you create a Feature, it is available across all platforms and the API.

You simply request the features for a user on any platform, and if the user qualifies, you'll receive it. There is no extra setup necessary to enable it on various platforms.

This means that if a feature is meant to be accessed on either your Java backend or React frontend, you can be guaranteed that the feature will be available at the correct times for the correct user/service regardless of where you call it from.

In short: one single Feature is managed across all platforms in one spot, with one toggle (if desired).

Another Approach: A single feature across multiple platform with different toggles or use cases.

You could very easily simply create multiple flags for each individual platform a feature is meant to be available on, and manage each individually. However, this isn't entirely necessary!

Within a feature setup, you can simply have two separate rules defining different variations being delivered to each platform. For example, you can set up a simple rule which ensures that Java will receive the feature, but React would not.

Feature Configuration with Multiple Platforms

A unique DevCycle approach: Managing multiple platforms independently.

Here is something DevCycle offers that would may handle your use case in a unique way:

Imagine every single time you create a feature, both a Java and React version of that feature are created.

These platforms would be managed separately within each feature, meaning that there is no potential of any accidental feature data bleeding between platforms in event that a feature doesn't exist on one platform but it does on another.

enter image description here

You can set up each platform as an entirely separate entity, meaning they would use different SDK keys, and all targeting will always be separate.

In the example above for example, the feature would be entirely disabled and not available in any Java SDKs calling out to DevCycle, but it would be available in React.

tl;dr

It's up to you how you want to manage things across platforms. DevCycle makes it easy to do this however you'd like: have all features across all platforms, splitting up your platforms, or just choosing to target differently depending on the feature.

2) Like levlaz said, that is the ideal, but you'll likely never want to achieve fully trunk-based nirvana, as there are a lot of use cases for having various environments and paths for your team to take in various scenarios.

That said, we've seen a lot of folks successfully get REALLY close by using Feature Flags.

I wouldn't suggest removing your build pipelines and CI/CD in favor of feature flags, instead, feature flags enhance those.

For example, with feature flags, you can remove the concept of feature branches and large feature pull requests. Instead, ensure that everything that ever gets put into production is always behind a feature flag. To ensure this happens, you can use workflow tools like github actionsthat do these safety checks for you. With these guards in place, you should now always be able to simply push through to prod without any concerns and run your deploy scripts on each merge. Then you can just target your internal / QA users for testing, and not worry about things hitting prod users!

You may still want to have some sort of disaster recovery environment and local environments, so never truly hitting a pure trunk, but you can get close!

Vic Vuci
  • 6,993
  • 6
  • 55
  • 90
0

[Disclamer: I work at LaunchDarkly]

For your first question, my general recommendation is to put flags as "high up on the stack" as possible. At the end of the day, you are making a decision somewhere. Where you put that decision point is entirely up to you. Within LaunchDarkly the flags are agnostic to the implementation so a single flag can live on the server, mobile, and client-side without any issues. Keep things simple.

For your second question, in practice, it is very rare to see teams fully make the switch to trunk-based development. This is the goal of 99% of the teams that I work with but depending on if you have a greenfield or a brownfield project the complexity of making the switch can be not worth the effort.

Lastly, Our CTO wrote a book this year called "Effective Feature Management"[1]. If you have not heard of this, I would recommend you take a look. I think you'll find some great insights there.

https://launchdarkly.com/effective-feature-management-ebook/

levlaz
  • 101
  • 2