X-Git-Url: http://git.rohieb.name/skm-ma-ws1314.git/blobdiff_plain/ce4c9f88cbf50fc383af61d1131f706b0f1e5446..bbf634a989779b4193d927a3f0046ba61e19f1c7:/sec-xmpp.tex

diff --git a/sec-xmpp.tex b/sec-xmpp.tex
index f1b57b4..3a44829 100644
--- a/sec-xmpp.tex
+++ b/sec-xmpp.tex
@@ -1,5 +1,4 @@
 \subsection{XMPP}
-\todo
 \pages{3-4}
 
 The \term{Extensible Messaging and Presence Protocol (XMPP)} is a distributed,
@@ -70,19 +69,40 @@ terminated.
 
 \todo[Example stream]
 
-\subsubsection{Multi-User Chats}
+\subsubsection{Publish/Subscribe and Presence}
+
+Typically, a user wants to chat with a more or less fixed set of other users,
+whose JIDs she needs to know, so she needs some kind of ``address book'' that
+remembers the JIDs for her. In XMPP, this is address book is called
+\term{roster}, and it also shows the users' willingness to chat (``presence'').
+In order to see their chat status (which can be  one of ``online'', ``offline'',
+and several ``away'' or ``do not disturb'' states), a user needs to subscribe to
+the other user's status. The mechanism behind this is called
+\term{Publish-Subscribe} and is specified in XEP-0060~\cite{xep-0060}. It can
+be used to notify interested users about changes in personal information, and
+implements the classic Observer pattern.
 
-\cite{xep-0045}
+A user publishes information by creating a \term{node} on the XMPP server, which
+acts as a handle for the data. Interested users can then query the server for
+nodes, and request subscription to them. When the owner of the node confirms the
+subscription request, subscribers get notified whenever the owner updates the
+respective node.
 
-\subsubsection{Publish/Subscribe, Presence and the Roster}
+All communication takes place between the client and the server over \code{<iq>}
+(``information query'') stanzas.
 
-\cite{xep-0060}
+\subsubsection{Multi-User Chats}
 
+Besides one-to-one messaging, XMPP also allows users to create multi-user
+chat rooms, which is specified in \cite{xep-0045}. Each chat room is given a
+unique JID to which the users send their messages to. Each incoming message is
+then dispatched to all users which have joined the room.
 
-\cite{rfc6121}
+To join a room, the user sends a \code{<presence>} stanza to the room JID, where
+the resource part of the room JID specifies the desired nick name.
 
 \subsubsection{XMPP Serverless Messaging}\label{sec:xsm}
-\todo
+\pages{1}
 
 To overcome the need for a central server and authentication, XMPP Serverless
 Messaging~\cite{xep-0174} allows XMPP clients on a network to build a
@@ -116,6 +136,4 @@ message or IQ stanzas like they would to an XMPP server. Presence is managed
 over the corresponding TXT record in the mDNS. To go offline, a client
 announces the deletion of its mDNS records.
 
-\pages{1}
-
 % vim: set ft=tex et ts=2 sw=2 :
