The Next Step: Plug-in
Google Gears Takes Ruby on Rails Offline
Developers are putting Google Gears to some interesting uses, including offline support for Ruby on Rails and building client-side search engines.
Gears for Rails represents another boost to cloud computing in its ability to deliver offline capability and synchronization. Meanwhile, Microsoft is leading its own data synchronization charge with its Live Mesh cloud-based data synchronization system, a test build of which is now open to the public.
However, Google has pushed its way into the cloud-based development world. And the third-party Gears for Rails solution also represents another call for Google to open up its Google App Engine platform to other languages, such as Ruby. Currently, the Google App Engine development platform supports Python only.
Michael Marcus and Rui Ma, two recent graduates from the information systems masters program at New York University, have designed a development framework called Gears on Rails. Google Gears is an open-source browser extension that lets developers create Web applications that can run offline. Gears on Rails is an open-source project that plugs Google Gears into Ruby on Rails, enabling developers to take a Ruby on Rails code base offline.
Almaer also did an interview with Marcus and Ma in which Ma described Gears on Rails as a proof-of-concept project whose goal is "to let developers build the offline version of their Web site without having to know anything about Gears or even to learn new techniques."
The team built a mechanism that detects the current status of the environment-whether online or offline-"so our framework can switch from the online to the offline version," Ma said.
Gears on Rails takes advantage of the REST (Representation State Transfer) capabilities of Rails "without building any additional pieces on the server side to actually do the synchronization," Marcus said.
The Next Step: Plug-in
The team's next step is to get the technology "into a fully formed plug-in that can be used with any Rails app," Marcus said.
"And to make it more open-source-friendly," Ma said.
"That sounds like a great idea," David Heinemeier Hansson, the creator of Ruby on Rails, wrote in response to questions about the Gears on Rails project. "I don't personally have that great of an interest in offline Web applications, but this stuff would be super for those who do. While it's probably a small fraction of developers out there who'll bother to make offline-capable applications, it doesn't mean that it's not important for those who do need it. However small a percentage that may be."
Neuberg used Google Gears and the Dojo Toolkit to create the client-side search engine. However, "PubTools Search is not an official Google project or Gears API; it is a project I created on my own to teach and help developers," he said.
In the introduction to his article on PubTools Search, Neuberg said, "Did you know that you can use Gears to do fast, client-side searching of data, similar to a client-side search engine? Gears bundles Full-Text Search (FTS) abilities right into its local, SQLite database. MySpace, for example, uses this feature with their MySpace Mail application, downloading all of a user's messages for fast, client-side search. Because all of the data is local, you can do nifty things like search over the data in real time as the user types, something that is much harder if you have to query over the network to a server to do the searching."