{"id":877,"date":"2024-06-11T16:00:58","date_gmt":"2024-06-11T16:00:58","guid":{"rendered":"https:\/\/fde.cat\/index.php\/2024\/06\/11\/unlocking-the-power-of-mixed-reality-devices-with-mobileconfig\/"},"modified":"2024-06-11T16:00:58","modified_gmt":"2024-06-11T16:00:58","slug":"unlocking-the-power-of-mixed-reality-devices-with-mobileconfig","status":"publish","type":"post","link":"https:\/\/fde.cat\/index.php\/2024\/06\/11\/unlocking-the-power-of-mixed-reality-devices-with-mobileconfig\/","title":{"rendered":"Unlocking the power of mixed reality devices with MobileConfig"},"content":{"rendered":"<p><span>MobileConfig enables developers to centrally manage a mobile app\u2019s configuration parameters in our data centers. Once a parameter value is changed on our central server, billions of app devices automatically fetch and apply the new value without app updates. These remotely managed configuration parameters serve various purposes such as A\/B testing, feature rollout, and app personalization. MobileConfig has been in production since 2015 and serves some of the world\u2019s most widely used apps, including Facebook, Instagram, and Messenger.\u00a0<\/span><\/p>\n<p><span>In this blog, we describe how MobileConfig enables rapid innovation on the Meta Quest and <\/span><a href=\"https:\/\/tech.facebook.com\/reality-labs\/2023\/2\/the-making-of-ray-ban-stories\/\"><span>Ray-Ban Meta smart glasses<\/span><\/a><span>.<\/span><\/p>\n<h2><span>Configuration challenges in mixed reality<\/span><\/h2>\n<p><span>Reality Labs devices can have extended development and release cycles; thus, reliable configuration and experimentation are vital for consistency, developer velocity, safety, and overall reliability.\u00a0<\/span><\/p>\n<p><span>As the mixed reality (MR) ecosystem has grown, we have introduced many more apps. These apps often need to share configuration values. With a lack of common patterns for config usage, there are anti-patterns where engineers reinvent the wheel or build ad hoc ways of fetching configuration that are very specific for each app. We also saw usage patterns when apps and services needed to retrieve values early during boot-up that made these problems more complex. These challenges made configuration and experimentation in MR much more challenging.\u00a0<\/span><\/p>\n<h2><span>Enter MobileConfig<\/span><\/h2>\n<p><span>In MobileConfig, a configuration (config for short) is defined as a set of parameters with a specific data type and can control different aspects of an application\u2019s behavior. Developers decided on the data type (Boolean, int, double, string) for the parameter to use when creating it. MobileConfig offers a cross-platform client library and API that allows developers to easily read each config parameter in our many different applications and services. It also provides a complete set of backend tools, allowing developers to precisely control which values a given parameter receives based on client context like region or device type.\u00a0<\/span><\/p>\n\n<p><span>MobileConfig has several use cases, including feature flags, A\/B testing, and release management. A developer can use MobileConfig to control the release of a new feature separately from the application release by placing it behind a config parameter. The config parameter can be tied to an A\/B test and enabled for a small segment of users while monitoring critical application metrics such as performance or engagement.\u00a0<\/span><\/p>\n<p><span>Alternatively, the parameter can be used as a feature flag, allowing developers to control who has access to the feature while it\u2019s under development. Once the feature is behind MobileConfig, the developer can make all these changes without touching client-side code.\u00a0<\/span><\/p>\n<p><span>Our blog on <\/span><a href=\"https:\/\/atscaleconference.com\/mobile-configuration-at-meta-the-key-to-mobile-agile-development-at-scale\/\"><span>\u201cMobile Configuration at Meta\u201d<\/span><\/a><span> discusses more on how MobileConfig is implemented and the design decisions behind the technology.\u00a0<\/span><\/p>\n<h2><span>Expanding MobileConfig as a platform in MR<\/span><\/h2>\n<p><span>Given our experience with mobile app development, it was clear that Meta\u2019s family of devices would also need a configuration system to move fast, enable experimentation, and remotely control various aspects of the systems. We decided that MobileConfig would be the best solution to fit the needs of these platforms because of its proven reliability and performance, existing suite of tools for troubleshooting and debugging, and its ability to release changes safely.\u00a0<\/span><\/p>\n<p><span>We centralized all configuration requests through a single Android service (MobileConfigService), resulting in lightweight clients that do not need to fetch configs, report telemetry, or understand backend protocols. We also centralized service authentication, enabling apps on the device to leverage session-based configs with or without user info. Here, with device-level consistency, the service was able to allow for experimentation in multiple apps and services at the same time, streamlining the onboarding process for new apps and allowing them to communicate with the leading service via IPC without needing to provide additional authentication or build-tooling (for configuration).<\/span><\/p>\n\n<p><span>Additionally, we have built libraries on top of MobileConfig in platforms like Windows to allow fetching configs where the MobileConfig API cannot be built as-is (aka <\/span><a href=\"https:\/\/engineering.fb.com\/2023\/04\/06\/open-source\/buck2-open-source-large-scale-build-system\/\"><span>using buck<\/span><\/a><span>). Overall, we avoided reinventing the wheel at a large scale and had a consistent user experience on MR, as our family of apps provided a vehicle for a net increase in developer velocity with a much lower learning curve.<\/span><\/p>\n\n<h2><span>Expanding MobileConfig to Meta\u2019s family of devices<\/span><\/h2>\n<p><span>The novel reuse of the MobileConfig service has enabled us to optimize our development process and improve the functionality of other low-powered devices. We never intended to use MobileConfig libraries on microcontrollers. However, we repurposed them into thin client(s) and removed dependencies to lower the overall memory footprint. Additionally, we optimized the developer authoring flow, allowing developers to target devices without <\/span><a href=\"https:\/\/engineering.fb.com\/2023\/04\/06\/open-source\/buck2-open-source-large-scale-build-system\/\"><span>standard buck integration<\/span><\/a><span>. Work here allows our low-powered devices to communicate and consume configs over Bluetooth and Wi-Fi.\u00a0<\/span><\/p>\n<p><span>Many of these devices, such as the Ray-Ban Meta smart glasses, have <\/span><a href=\"https:\/\/tech.facebook.com\/reality-labs\/2023\/2\/the-making-of-ray-ban-stories\/\"><span>multiple microcontroller architectures<\/span><\/a><span> controlling the various aspects of the product, including power, cameras, etc. In these cases, we use several technologies and protocols, such as IPC and SPI, to sync configuration values to the various components. In cases where the specific hardware could not run the core MobileConfig library due to language limitations, we could still reuse our highly efficient cache design and data structures to deliver configuration values. We abstracted these details from the developer experience, allowing for a unified configuration workflow.\u00a0<\/span><\/p>\n<p><span>Now, devices, specifically low-power devices, are not always connected to the internet, and they still need to run experiments and launch features independently of device releases. Our design choices helped us create a seamless companion app experience that uses the same mobile configuration libraries as our other family of apps, enabling these low-power devices for the same suite of features. This newfound flexibility speeds up our development process and time to market significantly, allowing us to deliver cutting-edge technology to our customers more quickly and efficiently.<\/span><\/p>\n<h2><span>Enabling future devices with limited connectivity and scarce resources<\/span><\/h2>\n<p><span>After our success with MR devices, we consolidated efforts to leverage MobileConfig as a centralized platform. Our goal is to enable the next generation of devices with the same suite of features and capabilities. These new-generation devices possess different challenges and MobileConfig needs to be highly performant and optimized for consuming compute resources on the device.\u00a0<\/span><\/p>\n<p><span>We optimized our service to run under specific conditions only (e.g., while charging or with Wi-Fi). Even with the configuration syncs to the server, our libs ensure we don\u2019t drain the battery since it\u2019s in minimal supply (much different than our family of apps). We also created customized IPC APIs to reduce memory and CPU usage. Work here enables dynamic configuration sets on newly installed apps to get config values from a centralized MobileConfig service.\u00a0<\/span><\/p>\n<p><span>While being in such a constrained environment, we successfully enabled experimentation at the OS level with customized <\/span><a href=\"https:\/\/source.android.com\/\"><span>AOSP Java and Native APIs<\/span><\/a><span> while keeping the same user experience as our other family of apps using Meta\u2019s tools. We\u2019ve also developed a customized tool that allows developers to quickly and efficiently use configuration with limited screen real estate, further unlocking developer efficiency. Advancements in future-gen devices have enabled us to provide a best-in-class service that sets us apart from our competitors and offers significant business value.<\/span><\/p>\n<h2><span>A leap into the future<\/span><\/h2>\n<p><a href=\"https:\/\/about.fb.com\/news\/2023\/05\/metas-infrastructure-for-ai\/\"><span>Meta\u2019s infrastructure<\/span><\/a><span> is empowering a new generation of devices, helping developers move swiftly. As we build more devices and applications, we will leverage MobileConfig as a centralized platform, given its capabilities and success with our existing lineup.\u00a0<\/span><\/p>\n<p><span>Efforts here allow our product groups to scale at rates that would otherwise take months and massive engineering efforts to coordinate. We drive with joint goals across organizations that put our user\u2019s needs at the forefront. <\/span><\/p>\n<p>The post <a href=\"https:\/\/engineering.fb.com\/2024\/06\/11\/core-infra\/mobileconfig-meta-mixed-reality-mr\/\">Unlocking the power of mixed reality devices with MobileConfig<\/a> appeared first on <a href=\"https:\/\/engineering.fb.com\/\">Engineering at Meta<\/a>.<\/p>\n<p>Engineering at Meta<\/p>","protected":false},"excerpt":{"rendered":"<p>MobileConfig enables developers to centrally manage a mobile app\u2019s configuration parameters in our data centers. Once a parameter value is changed on our central server, billions of app devices automatically fetch and apply the new value without app updates. These remotely managed configuration parameters serve various purposes such as A\/B testing, feature rollout, and app&hellip; <a class=\"more-link\" href=\"https:\/\/fde.cat\/index.php\/2024\/06\/11\/unlocking-the-power-of-mixed-reality-devices-with-mobileconfig\/\">Continue reading <span class=\"screen-reader-text\">Unlocking the power of mixed reality devices with MobileConfig<\/span><\/a><\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-877","post","type-post","status-publish","format-standard","hentry","category-technology","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":678,"url":"https:\/\/fde.cat\/index.php\/2023\/02\/13\/building-a-cross-platform-runtime-for-ar\/","url_meta":{"origin":877,"position":0},"title":"Building a cross-platform runtime for AR","date":"February 13, 2023","format":false,"excerpt":"Meta\u2019s augmented reality (AR) platform is one of the largest in the world, helping the billions of people on Meta\u2019s apps experience AR every day and giving hundreds of thousands of creators a means to express themselves Meta\u2019s AR tools are unique because they can be used on a wide\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":898,"url":"https:\/\/fde.cat\/index.php\/2024\/07\/18\/meet-caddy-metas-next-gen-mixed-reality-cad-software\/","url_meta":{"origin":877,"position":1},"title":"Meet Caddy \u2013 Meta\u2019s next-gen mixed reality CAD software","date":"July 18, 2024","format":false,"excerpt":"What happens when a team of mechanical engineers get tired of looking at flat images of 3D models over Zoom? Meet the team behind Caddy, a new CAD app for mixed reality. They join Pascal Hartig (@passy) on the Meta Tech Podcast to talk about teaching themselves to code, disrupting\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":662,"url":"https:\/\/fde.cat\/index.php\/2022\/12\/14\/how-salesforce-uses-immutable-infrastructure-in-hyperforce\/","url_meta":{"origin":877,"position":2},"title":"How Salesforce uses Immutable Infrastructure in Hyperforce","date":"December 14, 2022","format":false,"excerpt":"Credits go to: Armin Bahramshahry, Software Engineering Principal Architect @ Salesforce\u00a0&\u00a0Shan Appajodu, VP, Software Engineering for Developer Productivity Experiences @ Salesforce. To leverage the scale and agility of the world\u2019s leading public cloud platforms, our Technology and Products team at Salesforce has worked together over the past few years to\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":699,"url":"https:\/\/fde.cat\/index.php\/2023\/04\/11\/why-xhe-aac-is-being-embraced-at-meta\/","url_meta":{"origin":877,"position":3},"title":"Why xHE-AAC is being embraced at Meta","date":"April 11, 2023","format":false,"excerpt":"We\u2019re sharing how Meta delivers high-quality audio at scale with the xHE-AAC audio codec. xHE-AAC has already been deployed on Facebook and Instagram to provide enhanced audio for features like Reels and Stories.\u00a0 At Meta, we serve every media use case imaginable for billions of people across the world \u2014\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":702,"url":"https:\/\/fde.cat\/index.php\/2023\/04\/13\/how-device-verification-protects-your-whatsapp-account\/","url_meta":{"origin":877,"position":4},"title":"How Device Verification protects your WhatsApp account","date":"April 13, 2023","format":false,"excerpt":"WhatsApp has launched a new security feature that further helps prevent attackers from using vectors like on-device malware. This security feature, called Device Verification, requires no action or additional steps from users and helps protect your account. This feature is part of our broader work to increase security for our\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":735,"url":"https:\/\/fde.cat\/index.php\/2023\/07\/17\/bringing-hdr-video-to-reels\/","url_meta":{"origin":877,"position":5},"title":"Bringing HDR video to Reels","date":"July 17, 2023","format":false,"excerpt":"Meta has made it possible for people to upload high dynamic range (HDR) videos from their phone\u2019s camera roll to Reels on Facebook and Instagram. To show standard dynamic range (SDR) UI elements and overlays legibly on top of HDR video, we render them at a brightness level comparable to\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/comments?post=877"}],"version-history":[{"count":0,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/877\/revisions"}],"wp:attachment":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/media?parent=877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/categories?post=877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/tags?post=877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}