May 31, 2007, at Google Developers Day ( GDD07) Google announced Gears – a small AJAX framework that “enable offline functionalities for online applications”. Despite the shyness of publicly declared goals, many believe that Gears is a long expected first step in Google strategy to take on Microsoft dominance. I mostly agree with this point, but believe that Gears is more then just frontal attack on MS Office – I think that Gears may open a new interesting direction for mobile applications and distributed commuting ( see “speculations” section) .
At the moment, Google Gears (http://gears.google.com/) described as an early “BETA”, but judging by mailing list reports, it is in very early stages of development. Accordingly to private talks with Google engineers, this project was in the stealth mode until recently – even “Gears” name had been approved just a few days prior to announcement.
Google Gears is 100% open source project – main project page is at http://code.google.com/apis/gears/.
Source code is accessible via SVN at http://google-gears.googlecode.com/svn/trunk/gears/
Accordingly to Andy Palay, a member of the Gears development team, the main intension for Gears development is to allow offline use of online [Google] applications, such as Webmail, Calendar, RSS reader and even Notepad. The main point made: while we are “almost always online”, even 1% of network unavailability may hurt, especially if it happens in the most critical time. Also, it was interesting to note that performance was mentioned as one of the major problems for online applications usability . As an example, Andy mention importance to eliminate two way network delay, but technical description of Gears shows Google intension to look into distributed computing as well ( by offloading heavy tasks to the user computer, instead of performing them on the server). Specifically, a (yet primitive) multi-tasking support is implemented by WorkerPool component.
Adobe representative demonstrated a small cute demo of Apollo-based application with integrated Gears capabilities – running application from the web and then taking it offline as a standalone..(Note: looks like Google Gears vision is in a good fit with Adobe Apollo )
In addition to few small Gears-based demos, a “real” application had been shown. Google Reader (http://reader.google.com ) is a popular RSS reader application. Until recently, it required an online connection, but now, thanks to integration with Gears, you can go “offline” , download up to 2000 items and use Google Reader while offline.
In private conversation, Andy Palay confirmed that Reader is a first ( and so far – only) real application running on the top of the Gears platform . At present, Reader functionality is not yet “exactly” as envisioned by Gears team for future releases – today you have explicitly switch between offline and online modes and wait until synchronization completion. Gears team vision is that future applications will automatically synchronize itself with centralized resource whenever reliable connection established. The one of the Gear concepts ( accordingly to Andy) is to make user experience completely same regardless of connectivity at every given moment ( for those applications where it is possible).
Brad Neuberg from SitePen discussed Dojo Offline (watch it at http://youtube.com/watch?v=JgXn0rMRr9g ). Dojo (http://dojotoolkit.org/) is a popular JavaScript library for development of the AJAX applications and websites. Dojo Offline (http://dojotoolkit.org/offline ) is a toolkit extension that enables web applications to work offline. Dojo Offline consist from JavaScript library to be integrated/used by AJAX application and small run time module that implement HTTP proxy and other modules. Beta version of Dojo Offline had been released April 2007. However, due Google Gears announcement, Dojo Offline team decided to replace original run-time module with Gears’ one ( these efforts are sponsored by Google).
LocalServer is a very basic web cache engine. Using so-called “manifest”, it has to be explicitly instructed what static components (files) are belong to the given application. Once in while, LocalServer will check if server has an updated copy and will bring updates. All updates will happens atomically, to avoid mis-synchronization between various parts of application. A few important points to note: (a) application is always uses files from LocalServer store (current or updated) (b) LocalServer is not able to serve dynamic files – current design doesn’t consider ability to run “server-side” scripts (c)ALL browser traffic is going via LocalServer ( that opens some potential security issues) .
Database – offline application needs an ability to preserve data locally. Instead of building flat file system, Gears team decided to go after SQL managed storage. Database component build on top of lightweight SQLite (http://www.sqlite.org/) database engine.
WorkerPool – is a special component to run JavaScript in background, independently from main (browser-initiated) thread. This module can be used by AJAX application to run some time-intensive operation, such as encryption, computation, etc. Inclusion of such component into the first Gears release demonstrate Google intension to go after a real, “heavy” offline application ( it is interesting to note that “performance limitations” of online applications was mentioned as one of the reasons for Gears development)