Chapter 4. Instant Messaging
I Think, Therefore IM
The initial goal of the early Jabber project, well before the protocol was named XMPP, was to create an open Instant Messaging (IM) platform. Although IM is often thought of as person-to-person chat, at its core it really provides the ability to quickly route messages from one place to another over the network (no matter who or what the intended recipient is). For this reason, XMPP servers are optimized for handling large numbers of relatively small messages with very little latency. When you are exchanging instant messages, you don’t want to experience any delivery delays (which can be almost as annoying in IM as they are on the phone).
In XMPP, messages are delivered as fast as possible over the
network. Let’s say that Alice sends a message from her new account on
the wonderland.lit server to her sister on the
realworld.lit server. Her client effectively
“uploads” the message to wonderland.lit by pushing a message
stanza over a client-to-server XML stream. The wonderland.lit server then stamps a
from address on the stanza and checks the
to address in order to see how the stanza needs to
be handled (without performing any deep packet inspection or XML
parsing, since that would eat into the delivery time). Seeing that the
message stanza is bound for the realworld.lit
server, the wonderland.lit server then immediately
routes the message to realworld.lit over a server-to-server XML stream (with no intermediate hops). Upon receiving ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access