Last Friday, we took a look at how ‘modules’ in Google’s forthcoming Fuchsia OS come together to make ‘stories’. As we learned last week, a story is one or more apps working together to help you complete a single task. Fuchsia, for the uninitiated, is also designed to allow for quick switching between devices by saving your Stories to your personal ledger.
This week, we’re learning more about Ledger and how it helps Fuchsia tell your story.
First of all, Google wants to make it abundantly clear that “Ledger” is a software in and of itself, but “each user has a separate ledger.” To this end, Ledger even has its own style guide, which leads me to believe that it could play a part in Fuchsia’s branding and marketing. As mentioned, “Ledger”, with a capital “L”, is the proper-noun software itself. A “ledger”, one of which every Fuchsia account has, has a lowercase “l”.
Ledger, described as “a distributed storage system,” is part of Google’s attempt to make Fuchsia a more “human” operating system. People don’t just use one device anymore, but multiple — more traditional ones like smartphones, tablets and laptops, as well as newer innovations like smartwatches or Smart Displays. We use what’s most comfortable for the job at hand.
And that’s why Google has devised a system for managing all of this information. Each “component” (you could think of a component as an app) being run by a user has a “separate data store provided and managed by Ledger,” Google explains. Additionally, each of these data stores are private from one another. Separate apps being used by that user can’t see the data, and other users of that app can’t see the data, either.
The data store for the particular component/user combination is private – not accessible to other apps of the same user, and not accessible to other users of the same app.
These data stores (which, together, make up your ledger) are synchronized across devices via the cloud. Your lower-case-l ledger is secured to your Google account, by default.
Behind the scenes, Ledger is currently powered by three cloud services. The first is of course the Firebase Realtime Database (acquired by Google in 2014), which specializes in keeping JSON data synchronized across multiple devices and smoothing over internet connection loss. This method also uses the tried and tested Google Cloud Storage, for basic file storage. There’s also work being done on a version based on Firebase Cloud Firestore.
On an interesting side note, because these are fairly standard cloud services and Fuchsia is open source, other companies could theoretically implement their own versions of Ledger. This opens up the possibility of a Google-free build, similar to what Amazon’s Fire OS did for Android. For a better idea of what this could look like, check out our breakdown of Fuchsia’s four-layer design.
Ledger will also be fully capable of syncing in a ‘peer-to-peer‘ setting, making the transition between your devices even faster and smoother.
On the flip side of Ledger’s convenience, though, is an increased need for security. Should your account be compromised in any way, bad actors would have access to lots of computing history. For the average user, this is another reason to set up two-factor authentication, which we learned last month less than 10% of Google account owners have enabled.
Thankfully, for the most sensitive of materials, Fuchsia will almost certainly allow for some kind of local accounts which don’t sync information to the cloud. For one, there will apparently be a ‘guest mode,’ in which “Ledger works locally but does not synchronize data with the cloud.” Secondly, Google clearly states that Ledger is offline-first can function entirely without the cloud.
Any data operations are made offline-first with no coordination with the cloud. If concurrent modifications result in a data conflict, the conflict is resolved using an app-configurable merge policy.
All in all, the most important thing is that you should never have to think about Ledger. Everything should “just work” to create seamless and fluid transitions between your devices and accounts.
Fuchsia Friday is a weekly series where we dive into the Fuchsia source code and interpret what the current state of the OS might mean for the finished product. All information in this article is speculation based on available information and is subject to change.
Read more in our Fuchsia Friday series:
- Fuchsia Friday: What are Stories and Modules?
- Fuchsia Friday: Everything is an Entity
- Fuchsia Friday: A system built for ‘Instant Apps’ on steroids
- Fuchsia Friday: The structure of Google’s Lego-like modular OS, explained
- Fuchsia Friday: How Flutter is paving the way for Fuchsia (and our first Fuchsia app!)