close
close

Unlock the power of mixed reality devices with MobileConfig

MobileConfig enables developers to centrally manage mobile application configuration parameters in our data centers. When you change a parameter value on our central server, billions of app devices automatically download and apply the new value without updating the app. These remotely managed configuration parameters serve a variety of purposes, such as A/B testing, feature deployment, and application personalization. MobileConfig has been in production since 2015 and powers some of the most used apps in the world, including Facebook, Instagram and Messenger.

In this blog, we describe how MobileConfig enables rapid innovation in Meta Quest i Ray-Ban Meta smart glasses.

Configuration challenges in mixed reality

Reality Labs devices may have extended development and release cycles; therefore, reliable configuration and experimentation are essential for consistency, developer speed, security, and overall reliability.

As the mixed reality (MR) ecosystem grows, we have introduced many more applications. These applications often need to share configuration values. In the absence of common patterns for configuration usage, there are anti-patterns where engineers reinvent the wheel or create ad hoc ways to retrieve configurations that are very specific to each application. We also observed usage patterns where applications and services had to retrieve values ​​early in startup, which complicated these issues. These challenges have made MR setup and experimentation much more difficult.

Enter MobileConfig

In MobileConfig, a configuration (abbreviated as config) is defined as a set of parameters of a specific data type and can control various aspects of the application’s behavior. The developers have decided on a data type (Boolean, int, double, string) for the parameter that will be used when creating it. MobileConfig offers a cross-platform client library and API that allows developers to easily read every configuration parameter across our many different applications and services. It also provides a complete set of backend tools that enable developers to precisely control the values ​​received by a given parameter based on client context, such as region or device type.

Mobile setup

MobileConfig has several uses, including feature flags, A/B testing, and version management. A developer can use MobileConfig to control the release of a new feature independently of the application’s release by placing it behind a configuration parameter. The config parameter can be tied to an A/B test and enabled for a small group of users while monitoring critical application metrics such as performance or engagement.

Alternatively, the parameter can serve as a feature flag, allowing developers to control who has access to the feature while it is being developed. Once the feature is available behind MobileConfig, the developer can make all these changes without touching client-side code.

Our blog on “Mobile Setup in Meta” discusses more about the implementation of MobileConfig and the design decisions behind the technology.

Extending MobileConfig as a platform in MR

Given our experience in mobile app development, it was clear that the Meta family of devices would also need a configuration system to be fast, enable experimentation, and remotely control various aspects of the systems. We decided MobileConfig was the best solution to meet the needs of these platforms due to its proven reliability and performance, existing set of troubleshooting and debugging tools, and ability to share changes securely.

We centralized all configuration requests through a single Android service (MobileConfigService), resulting in lightweight clients that don’t need to download configuration, report telemetry, or understand back-end protocols. We’ve also centralized service authentication, allowing on-device applications to use session-based configurations with or without user information. In this case, through consistency at the device level, the service enabled experimentation with multiple applications and services simultaneously, streamlining the process of deploying new applications and allowing them to communicate with the leading service via IPC without the need to provide additional authentication or build-tooling (for configuration).

Additionally, we have built libraries on the MobileConfig platform on platforms such as Windows to enable downloading of configurations where the MobileConfig API cannot be built as is (called using a Polish zloty). Overall, we avoided re-inventing the wheel at scale and delivered a consistent user experience in the MR environment because our family of applications provided a tool for a net increase in development speed with significantly less learning time.

MobileConfig extension to the Meta family of devices

The innovative reuse of MobileConfig enabled us to optimize the programming process and improve the functionality of other low-power devices. We never planned to use MobileConfig libraries on microcontrollers. However, we repurposed them for thin clients and removed dependencies to reduce overall memory usage. Additionally, we’ve optimized the developer development flow by enabling developers to target devices without standard integration with Buck. Working here allows our low-power devices to communicate and leverage configurations via Bluetooth and Wi-Fi.

Many of these devices, such as Ray-Ban Meta smart glasses, come with this feature many microcontroller architectures controlling various aspects of the product including power, cameras, etc. In such cases, we use several technologies and protocols such as IPC and SPI to synchronize configuration values ​​with various components. In cases where the core MobileConfig library could not be run on specific hardware due to language restrictions, we can still reuse our high-performance cache design and data structures to provide configuration values. We extracted these details from developer experiences, enabling a unified setup workflow.

Currently, devices, especially low-power ones, are not always connected to the Internet and still need to perform experiments and run functions regardless of the device version. Our design choices helped us create a seamless companion app that uses the same mobile configuration libraries as our other family of apps, so these energy-efficient devices can benefit from the same set of features. This newfound flexibility significantly accelerates our development process and time to market, allowing us to deliver cutting-edge technologies to our customers faster and more efficiently.

Enabling future devices with limited connectivity and limited resources

After our success with MR devices, we combined efforts to use MobileConfig as a centralized platform. Our goal is to provide the next generation of devices with the same set of features and capabilities. New generation devices face various challenges, so MobileConfig must be very efficient and optimized to consume the device’s computing resources.

We have optimized our service to only work under certain conditions (e.g. while charging or connected to Wi-Fi). Even when the configuration is synchronized with the server, our libraries ensure that we do not drain the battery because it is minimal (which is very different from our family of applications). We also created customized IPC APIs to reduce memory and CPU usage. Working here enables dynamic configuration sets of newly installed applications to obtain configuration values ​​from the centralized MobileConfig service.

Being in such a limited environment, we successfully enabled OS-level experimentation with customization AOSP Java and native APIs while maintaining the same user experience as our other family of applications using Meta tools. We’ve also developed a customized tool that enables developers to quickly and efficiently use configurations in limited screen space, further improving developer productivity. Advances in next-generation devices have enabled us to provide best-in-class services that set us apart from the competition and offer significant business value.

Jump into the future

Meta Infrastructure supports the next generation of devices, helping developers act quickly. As we build more devices and applications, we will leverage MobileConfig as a centralized platform given its capabilities and success within our existing offering.

Efforts in this area allow our product groups to scale at a pace that would otherwise require months and coordination of massive engineering efforts. We are guided by common goals across organizations that put the needs of our users first.