Thursday, July 12th, 2007

Google Gears Roadmap and Features

Category: Gears, Google

Othman Laraki of the Google Gears team has published news on the Gears Roadmap and Development Process in which he discusses new features and details on the open process that the Gears team is going to follow.

Two concrete features that are forthcoming are:

Cross-Origin API

Google Gears has a strict same-origin security model. However, some web applications need to affect Gears resources in other origins. We can solve the problem by making a few incremental additions to the WorkerPool class. Those additions are noted below.


  1. int  createWorker(fullScript)
  2. int  createWorkerFromUrl(scriptUrl) // NEW METHOD
  3. void allowCrossOrigin()             // NEW METHOD
  4. void sendMessage(messageString, destWorkerId)
  5. callback onmessage(messageString, srcWorkerId, [srcOrigin]) // NEW 3RD PARAM

Improved Workerpool

WorkerPool has several issues today that make it harder to get started with compared to the other Gears APIs and this proposal addresses these issues by recommending the following changes:

  • Add WorkerPool.load();
  • Add WorkerPool.onerror;
  • Support for the defacto standard Console object
  • Remove the requirement to set google.gears.workerPool.onmessage inside workers

An example with console.log


  1. // parent code
  2. var wp = google.gears.factory.create("beta.workerpool", "1.1");
  3. wp.load(["test.js"]);
  4. wp.sendMessage("hello!");
  6. // test.js
  7. google.gears.workerPool.onmessage = function(message, senderId) {
  8.   console.log("worker got message %s from sender %s", message, sender);

If you have ideas, join in and be part of the process for a better web.

Posted by Dion Almaer at 6:21 am
Comment here

4.2 rating from 44 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.