Progressively Deliver Features on IBM Cloud

6 min read

Progressive delivery controls when and how the features are released to customers.

Traditionally, feature releases are stressful to developers, who are worried about the problems that customers would face with each release. Feature releases are also clubbed with deployments, and this increases the scope of issues that users may face. 

Progressive delivery, or continuous delivery++, is a modern development lifecycle that builds on top of continuous delivery with the use of feature management to increase speed and decrease the risk in every deployment.  Feature management is the base of progressive delivery.

Feature management, or feature flag management, decouples the release of features from deployments. Feature management enables businesses to dynamically control the release of the application features to end users.   

Feature management uses a technique called feature flags — otherwise known as feature toggles — to dynamically administer the lifecycle of a feature.  Toggling a feature on or off decides if the feature is enabled for usage to customers or not.

Progressive delivery

Progressive delivery controls when and how the features are released to customers, and teams need a mature CI/CD process in place as a base to achieve this. Using the fine-grained controls that the feature flags offer, developers are allowed to test in production with a low level of risk. When things go wrong, feature flags can be toggled off to turn off the feature until the issue is fixed. 

The term progressive delivery was coined by James Governor at RedMonk, and he says, “What we do is progressive experimentation because what really matters is the blast radius. How many people will be affected when we roll that service out and what can we learn from them?” He continued on to say, “A key insight about progressive delivery is that deployment is not the same as release. Service activation is not the same as deployment.” This is the key concept of progressive delivery — a deployment and a feature release are two different aspects of a service.

Progressive delivery makes the entire release process more resilient. Additionally, progressive experimentation (or A/B testing) reduces risk and allows you to iterate and determine the best possible customer experience:

 Progressively deliver features to different set of users using feature management.

Progressively deliver features to a different set of users using feature management.

Progressive delivery vs. continuous delivery

Progressive delivery is a natural evolution to continuous delivery. While the delivery of speed and quality remains as the top goal, progressive delivery shifts the focus from code to the feature, which helps reduce the risk of deployments. 

pd2

Benefits of progressive delivery

The following are a few of the main benefits of progressive delivery:

  • Control: Feature flags provide control over the release of new features to production environments. They also give control of feature releases to the business owners. Business owners can decide when to toggle a feature on or off.
  • Reduced risk: A feature can be released to a segment of users in production, which means the testing can happen in production, and the features can be toggled off when you notice a failure. 
  • Reduced downtime: When a feature malfunctions, it can be immediately be toggled off and no development or a deployment is required to revert the changes. 
  • Incremental delivery: A feature can be split into a small set of features and can be released to production without any fear. You can make this available to a subset of users in production to receive feedback. Based on the feedback, features can be enhanced before releasing to the entire customer community.

Feature management in IBM Cloud

IBM Cloud App Configuration is a centralized feature-management and configuration service. App Configuration helps developers progressively deliver in order to ship the code faster and reduce risk.

Benefits of IBM Cloud App Configuration

The following are some of the benefits of using IBM Cloud App Configuration:

  • Dark launch features
  • Decouple feature releases from deployments
  • Target features to segment users using rules
  • Realtime application updates based on feature updates
  • Manage distributed configuration
  • Control configuration of all environments in a centralized way
  • Govern and audit feature events using Activity Tracker
  • Track metrics using Sysdig

IBM Cloud App Configuration architecture

IBM Cloud App Configuration architecture
  1. The App Configuration service instance has environments, collections, feature flags, properties and segments with targeting rules. For more details refer to the documentation.
  2. The App Configuration SDK integrates into your web or mobile application. The App Configuration SDK handles the automatic delivery of the appropriate flag state and value into your application. All rule evaluations are executed in the SDK.
  3. The App Configuration SDK retrieves state and value of the feature flag or configuration property along with the targeting rule definitions from the service. This state and value information is sent to the SDK from the instance at real-time using the sockets.
  4. The App Configuration SDK works on the “Last Known Good Config.”  The SDK maintains a configuration cache and keeps it updated when there are changes in the service instance. If there are catastrophic errors (e.g., network issues) your application is still functional, with the data stored in the configuration cache.  The cache is updated automatically when the network is back and the connection between the SDK and service is resumed. The App Configuration SDK can be initialized using a Bootstrap configuration file so that the SDK can use the details in this file for evaluations. This file contains the collections, features, properties and the segment, along with the rule definitions.
  5. The App Configuration SDK sends the analytics data — like the evaluation time, evaluation count, entity ids, etc. — of the application to the service instance.

IBM Cloud App Configuration use cases

The following are some of the use cases that can be addressed by using IBM Cloud App Configuration:

  • Decouple deployments from releases
  • Targeted testing in production environments
  • Feature experimentation (beta testing and feedback loop)
  • Trunk-based development
  • User preference-based experience
  • Kill switches

Integrate IBM Cloud App Configuration into your application

Let’s integrate IBM Cloud App Configuration to our shopping website and release features using feature management. A sample shopping website application is available for this exercise. To set up and run the sample, see here

This sample showcases feature releases like a Flash Sale to all customers of the shopping website named “Shopper’s Delight” and the release of new category of products to the special customers using feature management. 

Set up and run the sample

To set up and run the sample, follow these instructions.

The following sections help you understand how App Configuration is used to release features in an efficient way by easily toggling on the features in the App Configuration UI for different sets of requirements.

Feature release

The Shopper’s Delight website is planning to expand its product profile. It is releasing a new set of products, such as Bluetooth earphones. To control the release of this feature using the App Configuration service, create a feature named “bluetooth-earphones” and use the App Configuration SDK to integrate this feature with the website application. Refer to the server.js file in the sample to see how this feature is integrated. 

When this feature is enabled by toggling on in the App Configuration service UI or using the App Configuration API, website users start to see the new set of products:

When this feature is enabled by toggling on in the App Configuration service UI or using the App Configuration API, website users start to see the new set of products:
When this feature is enabled by toggling on in the App Configuration service UI or using the App Configuration API, website users start to see the new set of products:

If these products have to be disabled for selling, the feature can be toggled off in the App Configuration UI.

The above sample describes using App Configuration to decouple deployments from feature releases. 

Targeted release of features

The Shopper’s Delight wants to promote sales by announcing a Flash Sale on their website. The company wants this to be allowed only for the registered users of the site. To enable this Flash Sale, a new feature named “flash-sale-banner" is created and segmented to the logged-in users. Segmentation is defined with rules in App Configuration according to the needs of their use case.  Refer to the server.js file in the sample to see how this feature is integrated. 

For the logged-in users verification, this sample uses a file-based db. The file is a json file located at public/users/users.json:

For the logged-in users verification, this sample uses a file-based db. The file is a json file located at public/users/users.json:

The above sample describes using App Configuration to target the release of features to a subset of customer base.

The same site can be extended to display “exclusive offers” to their paid customers. To do this, create a feature named “exclusive-offers” that is targeted to a segment of users who have a paid registration:

The same site can be extended to display “exclusive offers” to their paid customers. To do this, create a feature named “exclusive-offers” that is targeted to a segment of users who have a paid registration:

Similar to this use case, user preferences can be applied to show offers or products to users.

Summary

This article gives you an introduction on how to progressively deliver features using IBM Cloud App Configuration. It explains how features can be updated in real-time, with your application integrated with App Configuration SDKs.  

Resources

Be the first to hear about news, product updates, and innovation from IBM Cloud