O'Reilly logo

Professional XMPP Programming with JavaScript® and jQuery by Jack Moffitt

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 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 ...

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