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, Stories are 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.
And basically, 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 two 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. The second is the tried and tested Google Cloud Storage, used for basic file storage.
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.
Ledger opens the possibility of one cool Fuchsia feature we’ve already seen in its infancy and one I’m excited to try: context switching. After a long day at work, sometimes I just want to leave it behind for the evening and relax. A simple switch to my personal account, and I’m looking at my “Vacation Planning” and “Date Night” Stories.
This one use case for Ledger — context switching — can be seen in our recent preview, where a single button press switches the background and Now Feed suggestions. The shown method to do this — tapping on date — will almost certainly change when the underlying Google Account support is more fleshed out. We’re going to take a deeper look at context switching in a later Fuchsia Friday article.
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 and only syncs over the cloud when possible.
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 new 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: