Google’s Firebase mobile backend cloud service is making it easy for developers to add offline support to their mobile apps.
In a talk today at the I/O developer conference in San Francisco, Firebase cofounder James Tamplin will announce the new offline support in Firebase’s Android and iOS software development kits (SDKs).
Developers who use the new feature can rest assured that app users can access the data they want right when they need it — even after an Internet connection is lost.
It’s not a completely revolutionary addition — last year Facebook-owned Parse introduced the Local Datastore feature to add offline support for Android and iOS apps — but it could sweeten the overall Google Cloud Platform service portfolio for mobile app developers and make it appeal to people more than other major public clouds, like Amazon Web Services or Microsoft Azure.
And today’s news fits in nicely with some announcements Google made during its I/O keynote yesterday: mobile offline support for Google Maps directions, YouTube videos, and website content.
A blog post from Firebase core developer Jonny Dimond describes how the new offline technology works:
The Firebase database uses synchronization rather than request / response to move data between client and server. All read and write operations happen against a local, on-device version of your database first. Then, data is pushed and pulled from our servers behind the scenes. This design has allowed the Firebase database to compensate for network latency — local write operations are reflected by local reads before being acknowledged by the server.
It turns out, though, that this design is also essential to a high quality offline experience. By sending all reads and writes through a local version of the database, the Firebase SDK maintains the freedom to serve that data from the best source available — whether that’s from the network or local disk. Later, when a network connection becomes available, our SDK automatically commits local operations to the server and pulls in the latest remote updates.
Citrix has been using this feature for its Talkboard app since 2013.
“When you draw on a canvas in Talkboard, any updates you make while offline will be saved to disk and synchronized later when you reopen the app,” Dimond wrote in today’s blog post.