MySpace Message Center is now searching with Gears




MySpace announced new functionality into their MySpace Message Center today at Google I/O.

One feature that they were lacking was the ability for MySpace users to actually search their MySpace messages. To go through mail, users have to page through all of their messages until their find the right one. Not optimal to say the least!

They could have tried to do search on the server side, but it can be a very expensive operation, and when you are at MySpace scale, you have to choose your battles.

With server side search out, they looked at doing the work on the client. They ended up with a Gears powered solution that not only searches, but gives back results in real-time as you are typing it in. This means that you can stop typing earlier, as you find what you are looking for.

The MySpace team has been a pleasure to work with, and were very fast to put the pieces together of an Full Text Search datastore, and the WorkerPool to offload the search without hanging the browser. As I type this Owyn Richen is going over the details of the implementation at his Google I/O session.

We are excited to see them launch, and look forward to seeing what else they come up with!

New Gears and AJAX sessions posted for Google I/O





Google I/O is just a few weeks away (May 28 - 29). If you haven't already, don't forget to register for the event. We now have over 80 sessions posted, including a number of new sessions on Gears and AJAX technologies, including:

Taking Large-Scale Applications Offline - Lessons Learned from Google Docs
With the release of Google Docs offline, we asked the team if they could provide developers with some lessons learned. Google engineer Steve Saviano will explain the challenges that his team faced taking Google Docs offline with Gears and how they overcame them.

Gears and MySpace - an Exploration of Powering Search on the Client
Owyn Richen of MySpace will discuss their thoughts on using Google Gears to provide data-intensive features like adding search to their mail system.

HTML5, Brought to You by Gears
Aaron Boodman, whom many of you know as part of the core Gears team and also from Greasemonkey fame, will be talking about how the Google Gears mission relates to future web standards like HTML5.

Can We Get There From Here?
Alex Russell, co-creator of The Dojo Toolkit, looks at the state of the web development stack and the differing views and approaches to advancing development within a browser.

Improving Browsers in New Ways: Gears++
Chris Prince, also known in the UK as the Gears engineer with the best beard, will give a sneak peek at what's coming in Gears. You may be surprised that *none* of the features are related to offline. Rather, they fall under the broader Gears vision of improving web browsers.

Be sure to visit the website to see the complete list of sessions and to register. For those coming from out of town, we've arranged discounted room rates at nearby hotels. Read the details on the website to take advantage of the discount.

Gears and Standards




Gears is about more than just offline web applications. For example, we recently added desktop shortcut functionality, and we're working on resumable uploads, a geolocation API, and lots more fun things for the future.

We've received some questions recently about how all this relates to web standards, such as HTML5 and those proposed by the W3C. It seems like some people are afraid Gears will try to compete with the web.

Let us put those fears to rest right now: on the Gears team we loves us some web standards. Some of us were web developers stuck in the crossfire of the browser wars, and we deeply understand standards have played a key role in the productivity and creativity of the web over the past 10 years.

We have no desire to create a parallel platform and compete with the web. Anyway, that would be crazy. The web is an unstoppable force of nature. Competing with it would be like entering a shouting match with the wind: you can't win, and you look pretty silly trying.

Instead, Gears aims to bring emerging web standards to as many devices as possible, as quickly as possible.


Some History

The Gears project started because a group of developers at Google were frustrated by the slow march of web browsers. Competition and standards were producing fantastic results, but it took a long time to get implementations on every browser. In some cases, we still don't have compatible implementations, years after the standards were finalized. Our first project was to implement APIs that would make offline web applications possible.

Currently, the Gears Database and LocalServer modules are not fully compatible with the HTML5 proposals for the same functionality. This is only because those specs were written after Gears was released, and not because of any desire to be different. In fact, we were involved in the design of both HTML5 specs, and we are currently implementing the proposal for database access.


Going Forward

In many ways, Gears is like a browser without any UI. And just like other browsers, Gears will implement existing standards and rally for changes and additions where they seem needed. For example, we recently proposed our geolocation API work to the W3C WebAPI group.

There are three important differences between Gears and other browsers, however:
  1. Improvements to Gears can be used by developers immediately. Gears is available today on Firefox (for Windows, OS X, and Linux), IE, and IE Mobile. Implementations for more browsers and platforms are in progress. Developers no longer have to wait for every browser to implement new web standards before they can use them, they only have to wait for them to be available on Gears.

  2. Most browser vendors have two groups of customers: users and developers. User-facing features typically get more attention than developer-facing APIs, for a variety of reasons. But with Gears, developers are the only customers. We can focus completely on creating the best possible platform for web development.

  3. Gears is an implementation of web standards that lives inside another browser. For example, the HTML5 Database API might be available to developers through both the google.gears object and the traditional window object. This is OK, and in some ways a good thing. Developers will be able to mix and match the pieces of Gears and native browser implementations that work best.

The Pitch

By implementing emerging web standards, Gears is influencing what the web of tomorrow will look and act like. And since Gears is an open source project, anyone can contribute.

Get involved. You don't have to be able to code in C++. All that's needed is some free time and the desire to push the web forward.

What's new with Google Gears? A Tech Talk




Brad Neuberg and Ben Lisbakken of the Gears team gave a brown bag talk on some of the new and interesting features in Gears.

They show a lot of examples and tools such as:
  • PubTools: Brad developed this set of tools to enable offline caching of content in minutes. This is perfect if you have a set of content that you want to make available offline.

  • Google Gears for Mobile: Just yesterday we launched our first Google mobile application using Gears, with Picasa

  • Cross Domain Web Services: A good example using Flickr search

  • Dojo Storage has just had a new release so it plays in the new Dojo 1.x land, and has a Gears storage engine

  • blog.gears: Pamela Fox did a great job with this GData/Gears blogging application

  • Gears + Greasemonkey = GearsMonkey

It is fun to hear some of the fellow Googlers probe with their own questions!



Brad and Ben will both be at Google I/O, May 28-29, 2008, in San Francisco. We are keen to hear your thoughts on Gears and the Open Web.

This is not an April Fool's joke!




As of yesterday, it is possible to use Google Docs offline. We've all been working on this for a while now, and I think sometimes we take it for granted. A web-based word processor you can use without an internet connection?! Who'd'a thunk it?

Gigantic congrats to the Docs team, from all of us working on Gears. We especially love how simple you have made the setup and synchronization process.

Sometime soon, we'll have to get one of the Docs engineers to write a blog post about some of the challenges they faced bringing this together. There are some really interesting stories and lessons in there that would be useful to anyone aiming to offline-enable their web application.

To see offline Docs in action, check out the video below.

Gears Screencast: An Introductory Tutorial




Using a JavaScript API to cache web pages offline, interact with a client side database and introduce threading into your application isn't immediately intuitive because it's such a foreign concept for a web API. I remember when I was doing my first work with Gears -- I was a bit disoriented and in need of a walk through of how things work and why.

To help potential Gears users that feel like my 7-month-ago-self, I wrote a tutorial application that uses a minimal amount of non-Gears code. This application is a simple stock ticker that makes use of 5 of the Gears modules; LocalServer, Database, WorkerPool, Timer, and HTTPRequest.

But a standalone application can't teach someone -- it needs some explaining. Long articles generally lose my attention, so my media of choice was video. I made a screen cast where I walk through the code in three steps, which you can find here. There's also a zip file that contains the three steps of code so you can take a look at the code on your own. Please note that there is a PHP file that is required for the application to work, so you will need a server that runs PHP in order to use this code on your own!

Joose.Gears: Adding support for workers in a self-hosting meta object system




Malte Ubl, who brought us xssinterface, has a new project that has Gears support.

Joose is a self-hosting meta object system for JavaScript inspired by the Perl Moose. Joose supports inheritance, traits, mixins, method wrappers and more.

Where Gears comes into the mix is through the Joose.Gears meta class which enables automatic delegation of methods to be executed as a Gears worker. If Gears is not present, the worker is executed in the main thread. The workers result will be sent to a method called "on".ucfirst($worker_name) if available:

Class("HardWork", {
meta: Joose.Gears,
has: {
data: {is: rw, init: {}}
},
methods: {
onDoWork: function (result) {
ok(result == 1001, "Gear Worker returns correct result")
}
},
workers: {
doWork: function (start) {
var counter = start;
for(var i = 0; i < 1000; i++) {
counter++
}
return counter
}
}
})

var hw = new HardWork();

hw.doWork(1)
You can take a peak at the innards to see another interesting use of Gears.