Clique: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Create page)
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Developers}}

Clique is the protocol (formerly called rMulticast) used by [[telepathy-salut]] to implement multi-user chat on Link Local XMPP.
Clique is the protocol (formerly called rMulticast) used by [[telepathy-salut]] to implement multi-user chat on Link Local XMPP.


The following is derived and extracted from the clique.xml distributed with [[telepathy-salut]]-0.2.2 in docs/.
See [http://telepathy.freedesktop.org/xmpp/clique.html XEP-proto-clique] for the HTML document derived from the latest telepathy-salut docs/clique.xml

=Introduction=

Clique is an extension of XEP-0174 to support multi-user chat. It consists of the following components:

* 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
* XMPP-like XML messages sent with stream ID 0
* optional auxiliary data (e.g. Tubes) sent with stream IDs 1-65535, with semantics signalled by XML messages in stream 0

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.

XEP-0174 instance names are used for identification in a chat room.

The Clique XML namespace can also be used for certain elements sent over XEP-0174 unicast TCP streams, for instance to send invitations.

=Use Cases=

FIXME: there need to be some examples of the actual Clique protocol here

==Advertising a public link-local chatroom via mDNS==

In this example a chatroom called "Witchcraft" uses the multicast group 239.255.71.66, port 13251 (arbitrarily chosen).

We recommend that chatrooms use a random high port number in a random multicast group in the range 239.255.71.x.

; A dummy A record for the chatroom's multicast group
Witchcraft._clique._udp.local. IN A 239.255.71.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"

==Inviting a contact to a public or private room==

In this example crone@desktop invites hecate@broom to the chatroom given above.

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.


<!-- 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>239.255.71.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>


[[Category:Telepathy]]
[[Category:Telepathy]]

Latest revision as of 09:33, 1 January 2009

Clique is the protocol (formerly called rMulticast) used by telepathy-salut to implement multi-user chat on Link Local XMPP.

See XEP-proto-clique for the HTML document derived from the latest telepathy-salut docs/clique.xml