Panic-mode: A Disconnection-tolerant AJAX Library

O’Reilly Emerging Technology 2006-03-09

Carsten Bormann

cabo@tzi.org

AJAX = Pizza

AJAX =
Bread (HTML) + Cheese (JavaScript) + Tomatoes (XMLHttpRequest)

More toppings:

Outline

  • The problem
  • What you need to do about it
  • What I did about it

The Web as the Platform

Web 2.0 mantra:

AJAX assumes constant connectivity:

Realities of Mobile Work

For nomadic workers, connectivity may be flaky

or extremely slow

or unavailable

Frequently Connected Computing

Intel: Occasionally Connected Computing

A better term would be: Frequently Connected Computing

FCC and AJAX

For Frequently Connected Computing, applications need to be:

Making AJAX work with FCC:

Reduce number of pages

In disconnected mode, you don’t want to:

→ Single-page application, but with AJAX backend

Do serious error checking

How to handle network issues:

What can be done in case of error:

Don’t lose user input

User input can be kept as:

→ Persistency

PANIC-mode

ersistency for
JAX in
etworks with
ntermittent
onnectivity.
How not to lose input:

Approach: make the “backup” path the normal path:

Disconnected Operation

Disconnection tolerance increases likelihood of data changing on the server

PANIC-mode uses generation numbers to indicate conflicts

Conflict: Actual merge needs to be done by application logic

Limitations

Browser and network/server implementations impose limits:

Problem: Reaction to cookie overflow not really well-defined

Implications

Storing updates in Cookie = all changes are sent with each request

Good: No explicit action needed to send updates to server

Bad: Efficiency implications

Applications that fit PANIC-mode

Read/write applications:

PANIC-mode: Status

Proof of Concept implemented based on Prototype library

To do: