Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Internet of Things. No Comments on Extensible Messaging and Presence Protocol

In this article we will look at Extensible Messaging and Presence Protocol (XMPP), which is one of the widely used protocols in IoT.

 

Introduction

XMPP is a short form for Extensible Messaging and Presence Protocol. It’s protocol for streaming XML elements over a network in order to exchange messages and presence information in close to real time. This protocol is mostly used by instant messaging applications like WhatsApp.

 

XMPP means:

  • X: It means eXtensible. XMPP is a open source project which can be changed or extended according to the need.
  • M: XMPP is designed for sending messages in real time. It has very efficient push mechanism compared to other protocols.
  • P: It determines whether you are online/offline/busy. It indicates the state.
  • P: XMPP is a protocol, that is, a set of standards that allow systems to communicate with each other.

 

XMPP features are:

  • Open
  • Standard (RFC 6120, RFC 6121, and RFC 7622) by IETF
  • Proven
  • Decentralized
  • Secure
  • Extensible
  • Flexible
  • Diverse

 

XMPP can be used to build different applications. Some of them are:

  • Instant messaging
  • Presence
  • Multi-party chat
  • Voice and Video communication
  • Collaboration
  • Lightweight middleware
  • Content syndication
  • Generalized routing of XML data

 

The key XMPP technologies are:

  • Core — information about the core XMPP technologies for XML streaming
  • Jingle — SIP-compatible multimedia signalling for voice, video, file transfer, and other applications
  • Multi-User Chat — flexible, multi-party communication
  • PubSub — alerts and notifications for data syndication, rich presence, and more
  • BOSH — an HTTP binding for XMPP (and other) traffic

 

XMPP Core

At its core, XMPP is a technology for streaming XML over a network. The protocol, which emerged from the Jabber open-source community in 1999, was originally designed to provide an open, secure, decentralized alternative to consumer-oriented instant messaging (IM) services like ICQ, AIM, and MSN. The core technologies were formalized under the name Extensible Messaging and Presence Protocol (XMPP) at the IETF in 2004. These core technologies include:

  • The base XML streaming layer
  • Channel encryption using Transport Layer Security (TLS)
  • Strong authentication using the Simple Authentication and Security Layer (SASL)
  • Use of UTF-8 for complete Unicode support, including fully internationalized addresses
  • Built-in information about network availability (“presence”)
  • Presence subscriptions for two-way authorization
  • Presence-enabled contact lists (“rosters”)

 

An XMPP client is any software or application that enables you to connect to an XMPP for instant messaging with other people over the Internet. An XMPP server provides basic messaging, presence, and XML routing features. Code libraries are available for many different programming languages, thus enabling developers to build a wide variety of XMPP-enabled applications.

 

XMPP Architecture

XMPP has similarities to other application-layer protocols like SMTP. In these architectures, a client with a unique name communicates with another client with a unique name through an associated server. Each client implements the client form of the protocol, where the server provides routing capability. In this case (see figure), each client is part of the same domain (discovery.nasa.guv).

 

Extensible Messaging and Presence Protocol Names

 

Servers can also communicate for purposes of routing between domains (for example, between discovery.nasa.guv and europa.nasa.guv). Further, gateways can exist for purposes of translating between foreign messaging domains and protocols. The example in figure below shows an XMPP network with gateways to a Short Message Service (SMS) domain and an SMTP domain. Gateways are most often used in this context to translate between IM protocols (for example, XMPP to Internet Relay Chat [IRC]).

 

Extensible Messaging and Presence Protocol Architecture

 

As an extensible protocol, XMPP is an ideal backbone protocol to provide universal connectivity among different endpoint protocols. The XMPP gateway permits the termination of a given client-to-server session and the initiation of a new session to the target endpoint protocol (along with the necessary protocol translation). Addresses (or Jabber IDs [JIDs]) in XMPP are similar to standard e-mail addresses with a couple of notable differences. JIDs include an optional node, a domain, and an optional resource in the form:

 

[ node “@” ] domain [ “/” resource ]

 

The most common use is defining an IM user (like an e-mail address), such as [email protected]. A user can log in to an XMPP server multiple times, and in this case, the resource can denote a location.

 

 

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Leave a Reply

Your email address will not be published. Required fields are marked *