Feature and Configuration Management for Targeted Users in Products

Meiyappan Kannappa
3 min readAug 26, 2022

Many products release new features in phased manner based on users geographies, ip address or other profile parameters. How do they do that?

There was once such requirement on managing the feature or configurations in the applications different for each user or targeted set of users. The product has mobile and web frontend, in which the usable feature must be different for each user, and some user will have early access to beta feature.

There are multiple ways to achieve this, a simple way is to have flags in your java .properties file or in nodejs .env file or using apache commons configuration. This will work well up to a scale, however it cannot enable features, customise configuration at a scale like Netflix or Amazon with millions of users, how do they do feature targeting?

Launch Darkly a feature and toggle management platform comes to join hand in solving the same. A sophsticated platform to toggle features and configurations in the product for targeted set of users.

How it works?

The platform works on the concept of feature flag, you can create feature flag with multiple type of variations like boolean, double, string, json. A simple example whether a user(s) should see a button in the product can be managed using boolean flag. To make it more complex, based on the user grography a set configuration has to be applied will be done using feature flag with JSON variation. Launch Darkly provides SDK support to wide variety of languages including Java, Nodejs, React, Go, etc. Sample screenshot of new feature flag configuration in Launch Darkly.

In this article I will be using an example of how to enable features for various roles of users. Users of the product might be one among supplier, vendor and admin roles.

How to integrate with Launch Darkly?

Let us try integrating Launch Darkly with Java Spring Boot Application.

Below dependency has to be added for Spring Boot build.gradle. Ensure you add the maven repository under repositories section of build.gradle.

Next Create LDClient (Launch Darkly Client), for which you need SDK Key from LD portal, which you can obtain from here. You can manage keys for Prod and Non-Prod, perhaps you can create new environments as well

Now you can create a user and check the variation for the user. If you are checking a new user for the first time, default variation will be mapped. You need to configure the target users for each variation in the LD Dashboard Targeting section on feature flags, based on various parameters.

User Targeting

When a new user is added it will be listed in the users section of LD Dashboard.

Conclusion

I am observing many enterprise which are doing products are adapting to such kind of feature toggling tools and Launch Darkly is leading in this space, with its integerations and support for Mobile integration with Swift, Flutter, React-Native. You can try out LD for your requirements, and comment your thoughts.

Complete Example:

--

--

Meiyappan Kannappa

Technical enthusiast, daydreamer. Design of involute software architecture for digital transformation, sustainability and cost optimization.