summaryrefslogtreecommitdiff
path: root/docs/clique.xml
blob: 75ca8303ef40d6eb9bb718e1dd3b0f8bdf8513a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
  <title>Clique - link-local chat rooms</title>
  <abstract>A protocol for serverless link-local multi-user chat over
    reliable multicast.</abstract>
  <legal>Copyright (c) 2007 Collabora Limited. This document may be
    distributed under the same terms as the Telepathy specification.</legal>
  <number>proto-clique</number>
  <status>ProtoXEP</status>
  <type>Extension</type>
  <sig>Standards</sig>
  <approver>Telepathy project</approver>
  <dependencies>
    <spec>XMPP Core</spec>
    <spec>XEP-0174</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>NOT YET ASSIGNED</shortname>
  <author>
    <firstname>Simon</firstname>
    <surname>McVittie</surname>
    <email>simon.mcvittie@collabora.co.uk</email>
    <jid>simon.mcvittie@collabora.co.uk</jid>
  </author>
  <revision>
    <version>0.0.1</version>
    <date>2007-09-26</date>
    <initials>smcv</initials>
    <remark><p>First draft.</p></remark>
  </revision>
</header>
<section1 topic='Introduction' anchor='intro'>
  <p>Clique is an extension of XEP-0174 to support multi-user chat.
    It consists of the following components:</p>

  <ul>
    <li>a binary multicast message-passing protocol sometimes referred to
      as rMulticast, with retransmission/reliability,
      fragmentation/reassembly, causal ordering, and reliable membership
      semantics, in which messages are associated with a stream ID in the
      range 0 to 65535</li>
    <li>XMPP-like XML messages sent with stream ID 0</li>
    <li>optional auxiliary data (e.g. Tubes) sent with stream IDs
      1-65535, with semantics signalled by XML messages in stream 0</li>
  </ul>

  <p>The chat room behaves a lot like XMPP, and namespaces used in XMPP
    have their usual semantics. However, instead of a stream of XML
    as in XMPP, Clique's XMPP-like messages are individually well-formed
    XML documents.</p>

  <p>XEP-0174 instance names are used for identification in a chat
    room.</p>

  <p>The Clique XML namespace can also be used for certain elements sent
    over XEP-0174 unicast TCP streams, for instance to send invitations.</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
  <p>STRONGLY RECOMMENDED.</p>
</section1>
<section1 topic='Glossary' anchor='glossary'>
  <p>OPTIONAL.</p>
</section1>
<section1 topic='Use Cases' anchor='usecases'>
  <p>FIXME: there need to be some examples of the actual Clique protocol
    here</p>

  <section2 topic='Advertising a public link-local chatroom via mDNS'>
    <p>In this example a chatroom called "Witchcraft" uses the multicast
      group 224.0.0.66, port 13251.</p>
    <code>
      <![CDATA[
        ; A dummy A record for the chatroom's multicast group
        Witchcraft._clique._udp.local. IN A 224.0.0.66

        ; A DNS-SD service of type _clique._udp
        _clique._udp.local. IN PTR Witchcraft._clique._udp.local.
        Witchcraft._clique._udp.local. IN SRV 13251 ._clique._udp.local.

        ; For future expansion - implementations SHOULD NOT resolve this,
        ; unless they implement a future version of this protocol that
        ; defines some TXT keys for _clique._udp
        Witchcraft._clique._udp.local. IN TXT "txtvers=0"
      ]]>
  </section>

  <section2 topic='Inviting a contact to a public or private room'>
    <p>In this example crone@desktop invites hecate@broom to the
      chatroom given above.</p>
    <p>This would work just as well if the chatroom was not advertised
      in mDNS; this can be used to make "private" chatrooms. Note however
      that anyone with a network traffic sniffer can see the chatroom
      itself.</p>
    <code>
      <![CDATA[
      <!-- Sent via XEP-0174 unicast TCP from crone@desktop to
           hecate@broom -->
      <message from='crone@desktop' to='hecate@broom'>
        <invite xmlns='http://telepathy.freedesktop.org/xmpp/clique'>
          <roomname>Witchcraft</roomname>
          <address>224.0.0.66</address>
          <port>13251</port>
          <!-- reason is optional -->
          <reason>We need to plot Macbeth's doom, but the XMPP server is
            down</reason>
        </invite>
        <!-- Displayed by iChat and other non-Clique-compatible clients -->
        <body>You got a Clique chatroom invitation</body>
      </message>
      ]]>
    </code>
  </section2>
</section1>
<section1 topic='Business Rules' anchor='rules'>
  <p>OPTIONAL.</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
  <p>OPTIONAL.</p>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>
  <p>OPTIONAL.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
  <p>REQUIRED.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
  <p>REQUIRED.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  <p>None.</p>
</section1>
<section1 topic='XML Schema' anchor='schema'>
  <code>
    <![CDATA[
    <xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
      targetNamespace='http://telepathy.freedesktop.org/xmpp/clique'
      xmlns='http://telepathy.freedesktop.org/xmpp/clique'
      elementFormDefault='qualified'>

      <!-- LLMUC invitation. Sent over the IM socket -->
      <xs:element name='invite'>
        <xs:complexType>
          <xs:all>
            <xs:element name='roomname' type='xs:string'/>
            <xs:element name='reason' minOccurs='0' type='xs:string'/>

            <xs:element name='address' type='xs:string'/>
            <xs:element name='port' type='xs:unsignedShort'/>

            <!-- In OLPC builds, <properties> with NS_OLPC_ACTIVITY_PROPS
              goes here -->
            <xs:any minOccurs='0' maxOccurs='unbounded' namespace='##other'>
          </xs:all>
        </xs:complexType>
      </xs:element>

    </xs:schema>
    ]]>
  </code>
</section1>
</xep>