Intro to XMPP
XMPP is an Internet standard which we use for chat and game networking. Understanding what it is and how it works is a good first step in tackling many of our Google Code-in tasks.
XMPP stands for eXtensible Message and Presence Protocol. Its based on XML similar to HTML. Where HTML documents begin with
<html>, XMPP streams begin with a "stream" root element such as:
<stream:stream to='gci.copyleftgames.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
After authentication, three special XML elements are found inside the stream: iq, message, and presence. These elements and everything within them are called stanzas, and these have "from" and "to" attributes which allow them to be routed to other users. For example, if Alice sends a message to Bob it might look like
<message from="firstname.lastname@example.org" to="email@example.com" id="100" type="chat"><body>Hi, Bob!</body></message>
RFC 6121 goes into much more detail if you're interested, but doing is better than reading!
Start by connecting to our web-based chat an enabling the XML Console (below the chat window), watch how XMPP works by sending and receiving messages.
To complete this task, use the XML console to craft a custom
<message> stanza with both a
<helloworld/> element and a normal
<body> element to the gci room. This demonstrates you have a fundamental understanding of XMPP and are ready tackle greater challenges!