The main elements of Google Wave’s data model are:
Wave – Each wave has a globally unique wave ID and consists of a set of wavelets.
Wavelet – A wavelet has an ID that is unique within its containing wave and is composed of a participant list and a set of documents. The wavelet is the entity to which Concurrency Control / Operational Transformations apply.
Participant – A participant is identified by a wave address, which is a text string in the same format as an email address (local-part@domain). A participant may be a user, a group or a robot. Each participant may occur at most once in the participant list.
Document – A document has an ID that is unique within its containing wavelet and is composed of an XML document and a set of “stand-off” annotations. Stand-off annotations are pointers into the XML document and are independent of the XML document structure. They are used to represent text formatting, spelling suggestions and hyper-links. Documents form a tree within the wavelet.
Wave View – A wave view is the subset of wavelets in a wave that a particular user has access to. A user gains access to a wavelet either by being a participant on the wavelet or by being a member of a group that is a participant (groups may be nested).
The operational transformation is an integral part of wave. Any wave which is being edited shows up to all users currently under a wave. Users can see in real time what the others are typing and also the server is notified of the changes being happening wait for the server to accept changes. It is cached in case of latency. After the server replies all the actions are carried out in bulk. operations are carried out in a character basis to the server as well as to all the clients unless it involves large scale data manipulation like the upload of images or playing music. All XML documents which are exchanged between the client and the server carry a checksum which helps in the rapid identification of erroneous communications.
Operations. Wavelets, the basic component of a wave, go through a series of changes called operational transformations. These changes need to be propagated and applied to each client otherwise a client gets out of sync.
Operation Sequencing. All operations applied to wavelets are sent in strict order. An operation is not sent until the server has responded to the previous one. The server orders the operations based on a version number. Each client needs to apply the operations respecting the proper order.
Opening a wavelet. To start communicating on a wavelet, a client sends an Open Request containing the Wave ID and the Wavelet ID to the server. The server responds with a snapshot – the serialized state of the wavelet – or a history hash of the corresponding version.
Server-client Communication. The server sends to the client one of the following: a delta (a sequence of one or more operations), a version number or a history hash.
Client-server Communication. The client sends: a delta or a version number.
Recovery. When the communication fails, the clients starts by reopening the servlet by sending a history of hashes previously received from the server.