Why web apps will move offline

Have you noticed all the downtime lately? Del.icio.us had serious database problems, Bloglines was moving to a new data center, and TypePad had problems with their storage system. Even MXNA, the Adobe aggregator I wrote and maintain, was down for a couple hours Saturday morning while I was forced by database errors to upgrade MySQL. Moving all your applications and data online certainly seems like a good idea until either the service you need isn’t there, or your own Internet connection is down. Yesterday, I accumulated about half a dozen URLs that I needed to add to del.icio.us, but couldn’t, and I was forced to use Google Reader while Bloglines was on vacation. Of course it could have been worse. It could have been Writely or Num Sum that was down, and I might have needed access an important document or spreadsheet.

As more and more applications move to the web, and as we all come to depend more and more on being able to access those applications, two things are going to need to happen:

  1. They are going to have to become more robust. A little bit of downtime is always forgivable, but when I say a little, I mean a very little. When you have thousands of people who depend on your application, it simply has to be there. If your database fails, another one needs to automatically come online. If servers or storage fails, you need to have hot standbys. And if you need to move data centers, there are ways it can be done with little to no downtime. I’m not talking about my own personal preferences here because I’m pretty laid back about this kind of thing, but you really don’t want to give any of your customers reasons to try out your competition (of which there will be more and more). For instance, while Bloglines was down, I used Google Reader. I’ve already switched back, but I could have just as easily not.
  2. Web apps are going to have to move offline. I know this sounds like a step backwards, but it’s not. Right now, we are experiencing a transition from one extreme to another. Applications like Microsoft Word run locally and expected your data to be available locally while applications like Writely are completely web-based and expect all your documents to be on their servers. Someday, we will all be using applications that exist somewhere in the middle. We will download and update the applications over the internet, but they will run 100% on our local machines. And the data they use will be stored locally, but will be synchronized with remote servers so that it is automatically backed up and available from other workstations. And best of all, everything will run offline, at least partially. Obviously an IM client wouldn’t run very well offline, but an email client or word processor certainly could run just fine offline, as long as all your data was available locally, and could by synchronized once the application detected that you were back online.

Applications like these are not as far off as you might think. At Macromedia, we experimented with these concepts with Macromedia Central, and learned a lot about how these types of applications can and should work. It may seem pretty far fetched today, but I’m almost certain that in two years or less, we will have the option of using the majority of our web applications either online or off.

6 thoughts on “Why web apps will move offline

  1. …which (from a CF and ASP.NET coders point of view) sounds like the death of HTML “web applications” and all the more reason for Flash-based apps.
    I’ve been thinking along similar lines recently as well, especially after reviewing some prototype flash and .NET Avalon apps that do this and sync back to the server when next on-line.
    two points:
    1) storage – and security – of the local data. How and where, etc. E.G: encrypt the stored data ready for uploading, perhaps?
    2)** app security. This might sound a bit contradictory but should the app even work at all if disconnected from the server? what happens if unauthorised ppl get hold of it? can they de-compile the app and then mess with the innards? data collision management?
    lots of new questions. new frontier stuff.
    Christian, any thoughts on how Flash is positioned in all of this?
    cheers
    barry.b
    ** perhaps a download-able .EXE might be better than a SWF. I’m starting to see where the .NET “no touch depolyment” can kick in. Pity I’m jumping on the Apple/Mac band wagon…

    Like

  2. I’ve been experimenting with using a hidden Flash applet scripted using JavaScript to give persistent data storage and offline abilities to AJAX/DHTML applications; internally I use the Flash SharedObject infrastructure. I use the standard Flash plugin methods, such as GetVariable and SetVariable, and fscommands to do communicaton. This gives me access to all platforms that have Flash 6+ installed, except for Safari, where I have to use Flash 8 and ExternalInterface (which has some significant reliability and performance bugs that I have to work around, by the way – see http://codinginparadise.org/weblog/2005/12/serious-bug-in-flash-8.html for details).
    I got all of this to an alpha/prototype level with AMASS, the AJAX Massive Storage System, an open source project under a BSD license – see http://codinginparadise.org/projects/storage/README.html for details. I’ve been able to save and load megabytes of persisted data with excellent performance, way beyond the 4K limit of cookies.
    This month and in January I am bringing this work into dojo.storage, an open source AJAX/DHTML toolkit at http://dojotoolkit.org, to bring it to a beta level and make it more reliable; see http://codinginparadise.org/weblog/2005/12/dojostorage-api.html for details.
    The end result is once you have a reliable, persistent store for AJAX/DHTML applications you can go to the next level and begin to do interesting kinds of offline access; for an early prototype see http://codinginparadise.org/weblog/2005/10/javascript-sql-database-with-permanent.html for an. For example, if your AJAX/DHTML application models all of its actions using the Command pattern, if the application detects it is offline, using a simple timer that does a heartbeat against the server, then it simply begins to serialize these Commands into the permanent store. Then, when it detects the network has come back up, again from the heartbeat, it can just relay the Commands from the store. If the browser freezes up or locks up before then, you can safely know that your Commands have been persisted and will replay when the application comes back up.
    More and more I find that Flash and AJAX/DHTML are a good pair; Flash is really doing alot of the leading edge innovation in terms of browser capability, such as video and audio conferencing and streaming, while AJAX/DHTML seems to be more politically and technologicaly palatable to the alpha geeks and business managers that make technology decisions. They are a good pair.

    Like

  3. By the way, I don’t think it’s bad that people are using Flash as a hidden runtime for AJAX/DHTML aps. What is actually happening is its much easier for me to tell a corporate client that we will be using hidden Flash to provide a unique feature for a DHTML application, such as AMASS, then to recommend building the entire UI in Flash, which to many clients is too radical. However, you can think of it as the thin end of the wedge; once Flash is in there, even hidden, it’s there, and AJAX/DHTML apps might begin to depend on more and more features, such as faster streaming of data on the Flash side using Sockets. Then, when you want to expose some visible Flash, since it’s already there, it gets much easier; for example, I could tell a client that doing advanced video and audio with DHTML really isn’t possible, so why don’t we just expose a portion of the screen and use Flash Video, surround by the rest of our AJAX/DHTML application, since it’s already there and being used for persistent storage? Then, I could show them the webcam and audio boom support in Flash, and pull that in (well, if Flash Communication Server weren’t so unbelievably damn expensive, but thats another story…. I’ll just have to wait for Red5 to finish).

    Like

  4. Hi, I’m looking to build a cross platform hybrid online/offline app with the ability to save files. i looked at central but it seems pretty dead. any idea how of where to go for info on best-practices etc?

    Like

Comments are closed.