Resilience
November 24, 2006 – Graeme Sutherland – Print
So I’m sitting on a train on the way home from London. It takes an hour or so to get from London Bridge to Brighton. I climb on the train on one of the carriages that has the t-mobile wifi stickers on the doors. But as happens at least half the time, there’s no wifi. Oh well. When there is wifi, it at least is free.
So I have the laptop out anyway, writing and replying to emails and you know what? I flip over to the browser and get a popup from my Google Calendar reminding me of an event in my Calendar coming up shortly.
There’s no net connection. But the browser javascript deployed from google doesn’t mind, the alert still pops up. So what if we are offline. And that is nicely resilient and is perhaps a design pattern for web apps:
Resilience: Keep working even when the network goes away for a short while.
Not for ages, though, but at least be resilient for a number of minutes of outage. The standard web page (GET/PUT) normally handles this pretty well, but with AJAX you have the ability to tie you application close to the server. Don’t if you can avoid it except where necessary.
I typed a bunch of appointments into my Google calendar here on the train with no network. I wonder if they’ll get committed to the server when I reconnect. There’s no reason why not, really, and if it works, I’ll always keep Google calendar in a browser window and use it even offline.
[Update: I got home and no, it didn't remember appointments entered while offline. I can sort of understand that from a transactional point of view -- what if the window closes or the PC shuts down.]


Comments
Got something to say?