Chapter 7. Exploring Services: Service Discovery and Browsing

WHAT'S IN THIS CHAPTER?

  • The basics of service discovery

  • Interpreting service discovery results

  • Service discovery trees

  • How other XMPP extensions use service discovery

The federated world of XMPP servers and services is a big place, and it's growing every day. Early on, XMPP developers realized that they needed some way to find information about these servers and which services they supported. The XMPP service discovery system was created to fill this need.

Service discovery requests can be sent to nearly every XMPP-addressable entity on the network. Applications can find out which entities are servers, publish-subscribe systems, and multi-user chat services. Service information often includes the list of supported features so that application code never has to guess what functionality is supported.

Most of the extension protocols to XMPP make use of service discovery, usually to communicate feature support. Some also rely on it for service browsing. Multi-user chat services, for example, can be queried for what rooms exist, what settings are applied to a given room, and even which users are present.

Service discovery is a simple but important piece of many XMPP protocols, and your own applications will often need to use it in a variety of tasks. In the course of this chapter, you build a service browser called Dig, which allows users to explore various XMPP services.

APPLICATION PREVIEW

The Dig application is similar to other directory ...

Get Professional XMPP Programming with JavaScript® and jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.