Wednesday, July 29, 2009

Google releases Wave protocol implementation source code

Google has opened the source code of several key components of Wave, the company's new collaborative messaging platform. The code, which is available under the Apache Software License, will allow third-party developers to start experimentally bringing Wave-compatible federated messaging to their own software.

Google releases Wave protocol implementation source code

At the Google I/O conference earlier this year, the search giant revealed an intriguing new communication service called Wave that aims to deliver concurrent messaging and collaborative editing in a single cohesive environment. The underlying Wave Federation Protocol is designed to make it possible for third parties to host their own interoperable Wave instances.

Google intends to open the source code of its own implementation in order to encourage widespread adoption of the protocol. The company took its first major steps in that direction on Friday by releasing the source code of its Operational Transform (OT) code and a simple client/server reference implementation that is built on top of the protocol. This code, which is available under the open source Apache Software License, will give developers a way to start experimenting with the protocol and potentially even building their own Wave-compatible services.

"To kickoff Federation Day, we open sourced two components: 1) the Operational Transform (OT) code and the underlying wave model, and 2) a basic client/server prototype that uses the wave protocol," says an announcement in the official Google Wave developer blog. "The OT code is the heart and soul of the collaborative experience in Google Wave and we plan that code will evolve into the production-quality reference implementation,"

One of the most sophisticated characteristics of Wave is its deep support for concurrent communication. Multiple users can be manipulating the same content at the same time and user activity is immediately visible to other participants. This means that each individual character appears on the screen of all active users as it is being typed. Providing that level of concurrency in a seamless way and making it scale to accommodate a significant number of users is an extremely difficult problem to solve, especially in a highly diverse and extensible medium that can support rich media and other kinds of content.

The architecture of Google Wave is largely built around the concept of Operational Transformation. In Wave, individual operations are immediately performed locally and then get transmitted to the server, where all of the operations will converge. Then, the updated operational state history will be propagated back out to the individual clients. Applying the user's actions immediately in the local user interface rather than first propagating all events and rendering them linearly in true chronological order will help to ameliorate the perception of lag. Google refers to this behavior as "optimistic" user interaction.

Because of the complexity of Wave's concurrency model, Google is concerned that third-party implementations of the underlying OT framework will not be able to interoperate correctly with each other. Google aims to provide a standard production-quality reference implementation that all adopters will be able to use in order to minimize the risk of inconsistent behavior. The company says that it will also provide comprehensive testing frameworks to help guarantee the compatibility of third-party implementations.

"In a federated system, it is critical that each wave provider manage the operation stream consistently, otherwise convergence cannot be guaranteed," wrote Google's Jochen Bekmann in a message posted to the Wave Protocol Google Group. "This means it is highly recommended that anyone attempting to federate waves should exactly match the [concurrency control] functionality of every other wave server. We believe this is easiest if our released code is used."

The OT code that Google has released to the public is more recent than the version that is running today in the company's Wave Sandbox developer prototype. This reflects the rapid pace at which the protocol and its specification are evolving. Google is working on updating its sandbox version and bringing it into alignment with the latest OT code. At that point, the company hopes to enable federated messaging on the sandbox, giving third-party developers a working Wave instance with which to test the interoperability of their own.

Wave is highly exciting technology with enormous potential. As the platform opens further, it's likely that we will see Google's Wave protocol reference implementation code repurposed in innovative ways and integrated with other independent services.

No comments:

Post a Comment