XMPP architecture diagram with TikZ
authorRoland Hieber <rohieb@rohieb.name>
Fri, 20 Dec 2013 23:08:54 +0000 (00:08 +0100)
committerRoland Hieber <rohieb@rohieb.name>
Fri, 20 Dec 2013 23:09:08 +0000 (00:09 +0100)
fig-xmpp-architecture-mock.jpg [deleted file]
icon-computer.pdf [new file with mode: 0644]
icon-server.pdf [new file with mode: 0644]
main.tex
sec-xmpp.tex

diff --git a/fig-xmpp-architecture-mock.jpg b/fig-xmpp-architecture-mock.jpg
deleted file mode 100644 (file)
index dcaaec1..0000000
Binary files a/fig-xmpp-architecture-mock.jpg and /dev/null differ
diff --git a/icon-computer.pdf b/icon-computer.pdf
new file mode 100644 (file)
index 0000000..d2e160f
Binary files /dev/null and b/icon-computer.pdf differ
diff --git a/icon-server.pdf b/icon-server.pdf
new file mode 100644 (file)
index 0000000..289c786
Binary files /dev/null and b/icon-server.pdf differ
index 314324a..aaf81e7 100644 (file)
--- a/main.tex
+++ b/main.tex
@@ -6,7 +6,8 @@
 \usepackage{graphicx}
 \usepackage{wrapfig}
 \usepackage[hidelinks=true]{hyperref}
-
+\usepackage{tikz}
+\usetikzlibrary{arrows}
 \urlstyle{sf}
 
 \newcommand{\pages}[1]{\marginpar{#1 pages}}
index 1fadb2d..a89f414 100644 (file)
@@ -19,13 +19,27 @@ part is a string chosen by the user to distinguish those clients. Only the part
 the resource is only needed for routing between client and server.
 
 \subsubsection{Architecture}
-\begin{wrapfigure}{r}{0.4\textwidth}
-%\begin{figure}[htop]
+\begin{wrapfigure}{r}{0.5\textwidth}
+  \tikzstyle{iconlabel}=[text width=3cm, align=center, font=\footnotesize]
+  \begin{tikzpicture}[node distance=0pt,scale=1.5,>=stealth,thick]
+    \def\nodelist{
+      juliet/{(-1,-1)}/XMPP client \code{juliet@example.net}/below/computer,
+      examplenet/{(-1,1)}/XMPP server \code{example.net}/above/server,
+      imexampleorg/{(1,1)}/XMPP server \code{im.example.org}/above/server,
+      romeo/{(1,-1)}/XMPP client \code{romeo@im.example.org}/below/computer%
+    }
+    \foreach \name/\pos/\text/\tpos/\icon in \nodelist {
+      \node (\name) at \pos { \includegraphics[width=1.2cm]{icon-\icon.pdf} };
+      \node[\tpos=of \name,iconlabel] (\name text) { \text };
+    }
+    \draw[<->,dashed] (juliet) -- node[anchor=east]{s2c} (examplenet);
+    \draw[<->] (examplenet) -- node[anchor=south]{s2s} (imexampleorg);
+    \draw[<->,dashed] (imexampleorg) -- node[anchor=west]{s2c} (romeo);
+  \end{tikzpicture}
   \centering
-  \includegraphics[width=0.4\textwidth]{fig-xmpp-architecture-mock.jpg}
-  \caption{XMPP architecture}
+  \caption{XMPP architecture, showing server-to-server (s2s) and
+    server-to-client (s2c, dashed) connection types}
   \label{fig:xmpparch}
-%\end{figure}
 \end{wrapfigure}
 
 The original architecture underlying XMPP strongly leans on the established
This page took 0.071622 seconds and 4 git commands to generate.