No can has internets (offline use)

One of the issues with a distributed application is that you invariably need offline usage capability.

There are many use cases for this, but I’ll enumerate them, starting from ‘mostly connected’ to ‘mostly disconnected’:

  • Server/peer availability – in a distributed system, many computers will be participating in server roles. They won’t all have high availability, so being “offline” from one or more peer as you seek a new one needs to be not disruptive.
  • Transient connectivity quality – Even a highly connected individual experiences moments where their bandwidth is limited and/or expensive, and so ‘offline’ behaviour in those circumstances is helpful.
  • Intermittent outages – Many people do not have an ‘always on’ connection through a cell modem or something similar. These people frequently have decent access, but there are valuable periods where they are completely without bandwidth.
  • Frequent/predominant outages – There are many environments where transient connections are the norm. In these cases, offline use is predominant.

In all cases, what has to be addressed is not only the ‘simple’ technical requirement of maintaining a responsive UI and preserving state locally, but also the question of synchronizing the data when connectivity is restored. That issue is for a later post.

Offline options:

  • HTML5 offers a standards-based approach for offline usage that is supported by the latest browsers IE 8(!).
  • Google Gears offers offline storage as a plugin for older browsers, and it is built into Chrome.
  • The Pre, iPhone, and Android support the offline features of HTML5.

The data models provided

  • Web Storage allows for the preservation of key/value data, and offers ‘real’ session support. Keys are strings, and “Values can be any data type supported by the structured clone algorithm.”
  • A SQL storage . Basically in-browser SQLite.

Initial Use

The main thing we want to use it for to begin with is storing cryptographic keys for the user.

You can leave a response, or trackback from your own site.

Leave a Reply