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 8. Group Chatting: A Multi-User Chat Client

WHAT'S IN THIS CHAPTER?

  • Joining group chat rooms

  • Creating and configuring rooms

  • Exchanging presence and messages in group chat

  • Multi-user chat roles and permissions

  • Moderating rooms

XMPP's multi-user chat extension was originally inspired by the Internet Relay Chat (IRC) protocol. Some clever XMPP protocol designers wanted to improve upon IRC in several ways, while at the same time bringing group chat natively to XMPP.

XMPP's multi-user chat (MUC) has one enormous advantage over its predecessors — structured payloads. IRC and other chat protocols typically transmit plain text back and forth with very little structure. Because of XMPP's extensibility, MUC messages can carry arbitrarily complex payloads even within regular chat messages.

MUC is also a form of message broadcast. A single message sent to a room gets rebroadcast out to all the participants automatically. This makes it similar to Publish-Subscribe, which you see in the next chapter. Unlike Publish-Subscribe, MUC provides a lot of advanced management features typical of group chat services, such as room moderation, and each participant is often allowed to broadcast messages to the room as well.

The combination of structured messaging, automatic broadcast, and group publishing opens the doors to many alternative uses of MUC. It has been used as the basis for rich, collaborative spaces (for example, Drop.io, which was shown in Chapter 2), and in Chapter 11, you build a multi-user ...

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