My favorites | English | Sign in

Faster JavaScript with Closure Tools New!

Google Wave API (Labs)

WaveProtocol.org

Learn about the Google Wave Federation Protocol and get involved

Wave Extensions

Contents

  1. What Are Wave Extensions?
  2. Which Extension Should I Use?
  3. How Do I Add Extensions?

What Are Wave Extensions?

Wave extensions are a way to augment the functionality of waves and the wave client. Currently, the Wave API supports the following extensions:

  • Robots: Robots are applications which can be added to waves as automated wave participants. Robot extensions commonly automate tasks, but can also participate in the wave as a participant, interacting with the conversation based on their capabilities. For more information, see the Robots API Overview and Developer Guide.
  • Gadgets: Gadget extensions provide a shared program which runs within the wave, and to which all participants have access. For more information, see the Wave gadgets Developer Guide.

Google Wave also supports Extension Installers, which bundle up Backend elements (robots and gadgets) and Frontend UI elements into an integrated package. Users may install extensions directly within the Wave client using an extension installer. Because these installers include UI elements, their presentation is ultimately implemented by the Wave client; Wave clients, in turn, must understand the extension installer specification (known as a manifest ).

Note: currently, the Google Wave client is the only supported client, and therefore the only implementor of extension installers, but third-party clients should also support extension installers in their own way, once they are built.

Which Extension Should I Use?

Whether you use robots or gadgets is not mutually exclusive. You can use them together, but they generally serve different purposes. Each extension has a specific use case, noted below:

  • A robot is an automated participant on a wave. Robots are programs which run on an application server and can modify state within the wave itself. A robot can read the contents of a wave in which it participates, modify the wave's contents, add or remove participants, and create new blips and new waves. Robots perform actions in response to events. For example, a robot might publish the contents of a wave to a public blog site and update the wave with user comments.
  • A gadget is a small application that runs within a client. The gadget is owned by the wave, and all participants on a wave share the same gadget state. The only events a gadget responds to are changes to its own state object, and changes in the wave's participants (for example, participants joining or leaving the wave). The gadget has no influence over the wave itself. Wave gadgets typically aren't full blown applications, but small add-ons that improve certain types of conversations. For example, a wave might include a sudoku gadget that lets the wave participants compete to see who can solve the puzzle first.
  • The following table summarizes the differences between the various extension options:

    Robot Gadget
    Runs on application servers (currently AppEngine) and interacts with the wave over a protocol. Runs within the wave client itself.
    Each robot may instantiate at most one instance per wave. Remember that a robot is like a participant on a wave, so each participant/robot is a unique instance, but a wave can have many participants/robots. Each gadget may have multiple instances per wave, one for each participant interacting with the gadget.
    Robots may modify a wave and perform the same operations as a human participant. Gadgets are not able to modify a wave, and have limited visibility into the wave. A gadget is only able to detect changes in the wave's participants.
    Robots can modify a gadget. Gadgets have no way to know that a robot exists, and thus are not able to modify a robot.

    Extension installers run on a client and can access robots and gadgets, so their behavior depends on which elements they include.

    How Do I Add Extensions?

    If you've created an extension, you have several ways in which you can add the extension to Wave:

    • Robots may be added as participants to the Wave itself. In theory, a robot can be added anywhere a (human) participant can be added. You designate a robot by its address within your Contacts address book, for example, and can open up multiple conversations with the same robot, just as you would with a human. A robot may also be added as a participant within an extension installer, described below.

      For more information on robots, see the Robots Developer Guide.

    • Gadgets may be added to individual waves, where they share state and all participants may interact with the gadget. You can add a gadget to an individual wave by clicking the "Add Gadget" toolbar item. A gadget may also be added to a wave within an extension installer, described below.

      For more information on gadgets, see the Gadgets Developer Guide.

    • Extension Installers may be added to individual waves, in which case all other participants on the wave will also be asked to install the extension package. An extension package may consist of gadgets and/or robots. You can add an extension installer to a wave via the Debug -> Extensions -> Add Extension Installer menu item.

      For more information on extension installers, see the Extension Installers Guide.