O'Reilly logo

XMPP: The Definitive Guide by Remko Tronçon, Kevin Smith, Peter Saint-Andre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Building an XMPP Application

In this chapter, we start with an existing application and look at different ways of XMPP-enabling it with techniques you’ve learned earlier in the book.

The CheshiR Microblogging Platform

Meet “CheshiR,” our very own “microblogging” service. From the CheshiR website, you can post short pieces of text about what you are currently doing, reading, or thinking. Other people can then subscribe to (or “follow”) your postings, which means that they will receive a notification any time you post a new update. Figure 14-1 shows the home page of a CheshiR user with three contacts.

Posting and receiving microblogs via the CheshiR web interface
Figure 14-1. Posting and receiving microblogs via the CheshiR web interface

The CheshiR service is implemented in Python, using a very simple design. On one side, there is the HTTP frontend, which serves the web pages of the service. Whenever a user posts a message, it is sent to the CheshiR backend, which stores all the messages and subscriptions in a database. To display the homepage of a user, the frontend asks the backend for all messages sent by that user’s contacts.

To extend the reach of our service and improve the experience of our users, we are going to investigate different ways of integrating XMPP into our platform. Because we like the principles of agile software development, we’ll take an iterative approach, with focused code sprints to add a few well-defined features ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required