New Features in Google Wave Robots API
The Google Wave Robots API v2 is not backward compatible with version 1 and has been enhanced with new features like: Active API, Context, Filtering, Error Reporting, Proxying-For. Beside a Java and a Python client library useful to create robots, developers can build their own libraries based on the Robot Wire Protocol.
A robot is an automated wave participant. A robot runs as a server side application, being able to create waves and interact with them, for example by adding/removing participants, creating/modifying blips (the smallest unit of conversation exchanged in a wave), interacting with the outside world on behalf of waves. Google has upgraded the robots API to Robots API v2 which is not backward compatible with v1. All developers are invited to migrate their code to use the new API by June 30, 2010 when the old version will be retired.
Some of the new features introduced in Robots API v2 are:
- Active API: In v2, robots can now push information into waves (without having to wait to respond to a user action). This replaces the need for our deprecated cron API, as now you can update a wave when the weather changes or the stock price falls below some threshold. You can learn more in the Active API docs.
- Context: Robots can now more precisely specify how much information they want to get back from a particular event. If only the contents of the affected blip needs updating and you want to reduce your robot's bandwidth, then you can specify the new 'SELF' context. On the flip side, if you do need all the information in the wavelet, you can specify the new 'ALL' context. You can learn more in the Context docs.
- Filtering: In a similar way, with this new API, the robot can specify what events it needs to respond to, conserving valuable bandwidth -- and ignore all those that don't apply. You can learn more in the Filtering Events docs.
- Error reporting: Robots are now able to register to receive errors about failed operations, such as insertion on non-existent ranges. You can learn more in the Error Reporting docs.
- Proxying-For: Robots can now convey to Google Wave that their actions are actually on behalf of a different user, via the proxying-For field. For robots like the Buggy sample, which connects with the Google Code issue tracker, this means that the wave can be updated with attribution to users on non-wave systems. You can learn more in the Proxying-For docs.
Some of the newest features recently announced for Robots API are:
- Bundled Annotations – add new text and annotate it in one call
- Inline Blip Positions – getting the position of a blip inside of another blip
- Read Only Roles – setting the read-only wave access via API
A robot communicates with a wave via the Robot Wire Protocol which is an event based means of communication between waves and robots. A robot registers itself to the waves it is interested in and it is informed of changes and updates through events contained in JSON Message Bundles. Upon receiving such an event the robot may issue an operation to the wave either through JSON-RPC or using the Robots API.
Currently there is a Java Client Library and a Python Client Library to help developers create robots using the Robots Wire Protocol, but the protocol lets developers create new libraries using the language the want.
Edmund Jorgensen Nov 27, 2014
Lisa Adkins and Michael Spayd Nov 27, 2014