Open
Description
Summary:
Here's my visualization of a service that can handle experimental features.
We write a simple service called GatekeeperService
. The responsibility of this service will be to:
Control the access of any feature at a very granular level.
It will look like:
public interface GatekeeperService() {
boolean isGatekeeperEnabled(String gatekeeperName);
}
And gatekeeperName
can be:
- is_search_nearby_location_enabled
- is_retry_failed_upload_enabled
- is_review_uploads_enabled
- is_multiple_in_app_uploads_enabled
isGatekeeperEnabled
can return if a particular feature(key) is true or false.
In the most simplistic form, it can decide to enable/disable any feature on the basis of product flavor.
These are all the things based on which we can enable/disable any feature for a particular user:
- has user enabled experimental features or not
- Flavor: Beta/Alpha/Prod
- Android Version
- Username
- Country or location.