AbstractGoogle Wave is a communication and collaboration platform based on hosted conversations, called waves. A wave comprises a set of concurrently editable structured documents and supports real-time sharing between multiple participants. This document is one in a larger set of specifications for Google Wave. This specification describes Google Wave conversation manifest document schema and blip document schema, which together define the Google Wave conversation model. This application model is layered upon the documents, operations and operational transformation defined in the Wave Federation Protocol; see http://waveprotocol.org. Document StatusVersion 0.2 This document is a draft and subject to change, possibly rapid and non-backwards compatible, based on implementation experience. Table of Contents1. Introduction 2. Applicability 3. Terminology 4. Editorial Notes 5. Roadmap 6. Relationship between specifications 7. Terminology 8. Model 8.1. Document namespace and validation 8.2. Documents 8.3. Conversation Manifest Document 8.3.1. Elements 8.3.2. Private Replies 8.3.3. Examples 8.4. Blip Document 8.4.1. Schema Design 8.4.2. Elements 8.4.3. Annotations 9. Example Conversations 9.1. Simple Replies 9.2. In-line Replies 9.3. Private In-line Replies 10. Display 11. Mechanisms 11.1. Creating a new blip 11.2. Creating a reply thread 11.3. Deleting a blip 12. References 1. IntroductionA wave can be used to represent a conversation. This specification describes the Google Wave conversation model, which implements the conversation structure within structured documents in a wave.
2. ApplicabilityThe wave documents described in this specification may, in whole or in part, be interchanged between servers via the Google Wave Federation Protocol. The structure within a wave document is reminiscent of XML. A document contains an XML-like tree structure of elements, with attributes, and text. In addition, a document includes stand-off key/value annotations over arbitrary ranges. Documents are subject to constraints expressed in schemas similar to XML schemas. The use of XML in this specification in no way forces the server implementation to be XML-based. That is, XML is used as a convenient model and implementations are free to implement that model in the manner that is most convenient and performant.
3. TerminologyThe capitalized key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14, RFC 2119 [TERMS].
4. Editorial NotesTo provide feedback on this draft join the wave-protocol mailing list at http://groups.google.com/group/wave-protocol.
5. RoadmapWave is being actively developed and some features of the conversation model have not been documented, or may change in the short term. Currently undocumented are annotations, RTL text, images, and form elements. Here is a short roadmap of upcoming changes:
6. Relationship between specificationsThe Federation Protocol specifies the form and function of operations that mutate wave documents. While this specification deals only with conversation manifest documents and blip documents, a wavelet may contain documents of other types. Wavelets have metadata that is not stored in document form, including the wave id, wavelet id, and list of named participants for the wavelet. See the Federation Protocol for more details on wavelets and participants.
7. TerminologyThe following terminology is used by this specification:
8. ModelA conversation wave is a forest of conversations. Each conversation has a set of participants collaborating on a structured collection of blips. The structure of the conversation is maintained in the conversation manifest document, while the content of the conversational messages is stored in blip documents. Clients participate in the conversation by sending operations which mutate the conversation manifest and blips. The following assumptions about the wave model and operational transforms should be kept in mind when reading this specification.
8.1. Document namespace and validationEvery document in a wavelet has an identifier unique within the wavelet. Ids of documents are structured as a sequence of '+'-separated tokens. The first token of the id is conventionally the document namespace. That wavelet and document namespace determine the type of document (its schema). Different types of documents may have different validity constraints. Operations which violate the schema for a document must be rejected by the server. The namespaces for the documents described in this specification are:
An example blip document id: b+a8w3SD_k
8.2. DocumentsThis section describes the two document types that make up the conversation model.As a general principle of data modeling in waves, metadata is embedded in documents where it can be manipulated by operations. The conversation metadata includes the message structure and contributors. Below are examples of a blip document and a conversation manifest document. Blip document example <contributor name="dadams@acmewave.com"> <body> <line></line>There is a theory which states that if ever anybody <line></line>discovers exactly what the Universe is for and why it <line></line>is here, it will instantly disappear and be replaced by <line></line>something even more bizarre and inexplicable. There is another <line></line>theory which states that this has already happened. </body> Conversation manifest document example <conversation sort="m"> <blip id="b+a"> <!-- first message --> <thread id="3Fsd"> <blip id="b+aaa"></blip> <!-- indented reply to "b+a" --> <blip id="b+aab"></blip> <!-- continuation to "b+aaa" --> </thread> <thread id="jjKs"> <blip id="b+aba"></blip> <!-- another reply to "b+a" --> </thread> </blip> <blip id="b+b"> <!-- continuation after "b+a" --> <peer id="chess+4342"></peer> <!-- consistency peer identifier --> <thread inline="true" id="J362"> <blip id="b+baa"></blip> <!-- inline reply to "b+b" --> <blip id="b+bab"></blip> <!-- continuation to "b+aaa" --> </thread> <thread inline="true" ... > <!-- another inline reply group, possibly at the same location --> ... </thread> <thread id="9dKx"> <!-- non-inline reply to "b+b" --> ... </thread> </blip> </conversation>
8.3. Conversation Manifest DocumentA conversation manifest document has the distinguished document id 'conversation', and is the only document in the 'conversation' namespace. There is one conversation manifest document per conversation. The conversation manifest defines the logical structure of the conversation by describing the relationships between the blips. See the Display section for how the logical structure of conversations is reflected in the user-interface of a wave client. Blip elements are wrapped in a grouping element 'thread', except for top-level blips which belong to an implicit root thread. A blip may have multiple child 'thread' elements representing replies. Each 'thread' element has an id, unique within the conversation. Thread ids have no semantic meaning. A manifest document containing duplicate blip or thread ids is currently undefined. Here is a very simple conversation manifest that references only a single blip. <conversation>
<blip id="b+a"> <!-- first and only message -->
</blip>
</conversation>
Here is a more complex conversation manifest that references multiple blips. <conversation>
<blip id="b+a"> <!-- first message -->
<thread id="x123">
<blip id="b+aaa"></blip> <!-- indented reply to "b+a" -->
</thread>
<thread inline="true" id="x983">
<blip id="b+aba"></blip> <!-- another reply to "b+a" -->
<blip id="b+abb"></blip> <!-- another reply to "b+a" -->
</thread>
</blip>
</conversation>
8.3.1. ElementsThese are the allowed elements in a conversation manifest.
8.3.2. Private RepliesPrivate replies are represented as distinct wavelets with their own conversation manifest containing a reference to the parent conversation wavelet. Sub-conversations reference the parent conversation's manifest document with a (wavelet-id, blip-id, location, version) tuple referred to as an anchor. This tuple refers to a parent blip by naming the replied-to wavelet and blip. The location and version attributes refer to the corresponding blip element in the replied-to conversation's manifest document at some previous version. This ensures the information is still present if the parent blip is deleted. An inline private reply also references an anchor point in the replied-to blip at a selected version. A forthcoming mechanism will allow clients to request a server to transform a location to the current version for rendering. This representation prevents leakage of the existence of the private reply to participants who cannot access it. Note that this structure still leaks the existence of the parent conversation to the private reply. The anchoring tuple is represented as a set of optional attributes on the conversation tag of the conversation manifest document.
8.3.3. ExamplesA root wavelet has no anchoring information. <conversation></conversation> A non-inline private reply wavelet, referencing a blip in the conversation manifest document. The sort attribute determines sibling wavelet sort order by lexicographic value order. <conversation
sort="p"
anchorWavelet="conv+root"
anchorBlip="b+123"
anchorManifestOffset="45"
anchorVersion="7436" >
</conversation>
An inline private reply, also has an anchor offset referring to the replied-to blip. <conversation
sort="p"
anchorWavelet="conv+root"
anchorBlip="b+123"
anchorManifestOffset="45"
anchorVersion="7436"
anchorOffset="784">
</conversation>
8.4. Blip DocumentA blip document is distinguished by having a document id that begins with the namespace 'b'. A simple blip document. <contributor name="me@gwave.com"></contributor>
<contributor name="you@gwave.com"></contributor>
<body>
<line></line>The quick brown fox...
</body>
A more complex blip document. <contributor name="me@gwave.com"></contributor>
<contributor name="you@gwave.com"></contributor>
<contributor name="fred@acmewave.com"></contributor>
<body>
<line></line>The quick brown fox
<line></line>Jumped over
<line></line>the lazy dog.
<image attachment="a+sadkfd">
<caption>A lazy dog.</caption>
</image>
</body>
8.4.1. Schema DesignThe documents representing messages (blips) conform to a very simple schema. The blip document schema expresses a structured representation of the message with little presentation logic, and is mostly not web-specific. For example, most rich-text styling is represented in annotations. This representation behaves in a much more natural way when two clients concurrently edit overlapping regions of text. The document representation may not correspond to the most natural semantic interpretation, but is designed to behave most naturally under operational transformation.
8.4.2. ElementsThe allowed elements of a blip are:
8.4.3. AnnotationsThe following are the allowed annotations allowed in blip documents.
8.4.3.1. StyleStyle annotations control the display of the content in the blip. All style annotations have names that begin with "style/". The allowed values for the style annotations are the same as those of the CSS properties of the same name.
8.4.3.2. UserThe following annotations refer to a user id and a session id. Each client gets its session id from the server. Session ids, their assignment, and how they are transmitted to a client are out of scope for this document. It should be noted that to avoid name clashes when federating waves the session id should include the domain of the server generating them. Style annotations control the display of the content in the blip. User annotations contain information that is specific to each user session. All user annotations begin with 'user/'.
8.4.3.3. LinksLink annotations define links to other resources. All link annotations have names that begin with "link/".
9. Example Conversations
9.1. Simple RepliesThis is an example conversation showing how a conversation is represented by this model. This conversation consists of two blips and a conversation manifest document in one wavelet. The conversation manifest has an id of "conversation" and is: <conversation>
<blip id="b+a">
<thread id="r1">
<blip id="b+b"></blip>
<blip id="b+c"></blip>
</thread>
</blip>
</conversation>
There is a blip with an id of "b+a": <contributor name="fred@acmewave.com">
<body>
<line></line>There is a theory which states that if ever anybody
<line></line>discovers exactly what the Universe is for and why it
<line></line>is here, it will instantly disappear and be replaced by
<line></line>something even more bizarre and inexplicable. There is another
<line></line>theory which states that this has already happened.
</body>
A reply blip with an id of "b+b": <contributor name="barney@acmewave.com">
<body>
<line></line>Isn't that a quote from Douglas Adams?
</body>
And a reply blip with an id of "b+c": <contributor name="fred@acmewave.com">
<body>
<line></line>Yes it is.
</body>
9.2. In-line RepliesThe above shows the conversation with non-inline replies. Here is the same conversation, but the replies are in-line. This conversation will display differently from the above conversation. The conversation manifest has an id of "conversation" and is: <conversation>
<blip id="b+a">
<thread inline="true" id="r1">
<blip id="b+b"></blip>
<blip id="b+c"></blip>
</thread>
</blip>
</conversation>
There is a blip with an id of "b+a": <contributor name="fred@acmewave.com">
<body>
<line></line>There is a theory which states that if ever anybody
<line></line>discovers exactly what<reply id='aF8j_s'></reply> the Universe is for and why it
<line></line>is here, it will instantly disappear and be replaced by
<line></line>something even more bizarre and inexplicable. There is another
<line></line>theory which states that this has already happened.
</body>
Note the addition of the reply element which anchors the in-line reply. A reply blip with an id of "b+b": <contributor name="barney@acmewave.com">
<body>
<line></line>Isn't that a quote from Douglas Adams?
</body>
And a reply blip with an id of "b+c": <contributor name="fred@acmewave.com">
<body>
<line></line>Yes it is.
</body>
9.3. Private In-line RepliesThe above shows the conversation with inline replies. Here is the same conversation, but the replies are private in-line. This conversation will display differently from the above two conversations. The conversation manifest has an id of "conversation" and is an contained in the wavelet with an id of 'wave+a'. <conversation>
<blip id="b+a"></blip>
</conversation>
There is a blip with an id of "b+a": <contributor name="fred@acmewave.com">
<body>
<line></line>There is a theory which states that if ever anybody
<line></line>discovers exactly what the Universe is for and why it
<line></line>is here, it will instantly disappear and be replaced by
<line></line>something even more bizarre and inexplicable. There is another
<line></line>theory which states that this has already happened.
</body>
The replies are contained in another wavelet with an id of 'wave+b'. Being a wavelet it has its own conversation manifest: <conversation
sort="r"
anchorWavelet="wave+a"
anchorBlip="b+a"
anchorManifestOffset="1"
anchorVersion="12"
anchorOffset="10">
<blip id="b+b"></blip>
<blip id="b+c"></blip>
</conversation>
The reply blips are in the 'wave+b' wavelet. There is the reply blip with an id of "b+b": <contributor name="barney@acmewave.com">
<body>
<line></line>Isn't that a quote from Douglas Adams?
</body>
And a reply blip with an id of "b+c": <contributor name="fred@acmewave.com">
<body>
<line></line>Yes it is.
</body>
10. DisplayThe structure and relationships between wavelets, conversation manifests and blips defines a logical structure for conversations. What follows is a description of how the content and structure defined is presented in a user-interface, fully realizing that implementing wave on different clients will impose different constraints. The below isn't meant to constrain client implementations, but to give guidance on providing a consistent user experience. A conversation should be displayed as a single unit and may reference more than one wavelet. A wavelet is considered to be in a conversation view if it has a wavelet id in the "conv" namespace and the user has permission to access the wavelet. Wavelets other than the root in a conversation view should reference another via an anchorWavelet attribute. Blips are displayed in the order that they appear in the conversation manifest, going from top to bottom. Blip documents in a wavelet that are not referenced in the conversation manifest should not be displayed. Threads are indented from the content of their parent blip unless they have a property value of inline=true. The location of private replies is determined by the "anchorWavelet", "anchorManifestOffset", "anchorVersion", "anchorBlip", and "anchorOffset" properties of the conversation element. Note that the anchor position is given for version at which the private reply was created, and is recorded in the "anchorVersion" attribute. The proper display location for the private reply will depend upon keeping track of how that historical position moves as documents are mutated. The location of non-private inline replies is denoted with a reply element in the thread and should be displayed indented at that location. The display of private inline replies should include an indication that it is private, such as displaying the participants for that wavelet, along with the content of the sub-conversation.
11. MechanismsThis section describes some mechanisms for changing the conversation structure. Additional mechanisms remain to be defined. In addition, the interactions of concurrent modifications have yet to be detailed.
11.1. Creating a new blipTo add a new blip to a thread an operation is sent to insert a blip element (with a unique id) to the thread in the conversation manifest. The added blip document may or may not be empty.
11.2. Creating a reply threadTo add a new thread an operation is sent to insert a thread element (with a unique id) to the replied-to blip element in the conversation manifest. If the thread is an inline reply an anchor element must first be inserted in the replied to blip.
11.3. Deleting a blipDeleting a blip involves deleting the blip, any inline replies to the blip, and (optionally) any non-inline replies to the blip. This mechanism deletes only inline replies. A blip is deleted by sending mutations that:
After a blip is deleted, non-inline replies to that blip are still nested within their parent in the conversation manifest. They may be rendered as children of a deleted blip. Future restructure operations may allow the children to be re-parented. If a deleted blip has no remaining replies then the blip entry should be deleted from the conversation manifest document. If the deleted blip was the last in a thread then the thread entry should be removed from the manifest document. Edits that occur concurrently with a blip deletion are nullified in transform. Concurrently created replies to a deleted blip are deleted if the blip has no replies, but survive if the blip element remains (with "deleted" set to "true").
12. References
Authors' Addresses
|
