Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

What is XMPP Protocol

Extensible Messaging and Presence Protocol Details

  • Login to see the comments

What is XMPP Protocol

  1. 1. XMPP Protocol   The Extensible Messaging and Presence Protocol Tehran Linux User Group Hamidreza Soleimani September 01, 2014
  2. 2. What is it It is - eXtensible - Messaging & Presence - Protocol It is not - Binary Protocol - General Purpose - Server or Daemon And also - Open Protocol - Application Layer - XML Based - Asynchronous - Long Lived Connection
  3. 3. History 1998 Jabber Protocol Was Invented By Jeremie Miller to scratch his itch 1999 First Release of JabberD 2000 Open-Source Community and Jabber Many open-source clients were developed Its Java and Perl library were developed Details of its wire protocol was documented JabberD version 1.0 was released 2004 IETF and Jabber XMPP Protocol published [RFC 3290-1] 2005 Google and XMPP GTalk launched over XMPP 2008 Cisco and XMPP Jabber Inc. was acquired by Cisco Co. 2010 Facebook and XMPP Facebook opened up XMPP interface for its chat 2011 Modified XMPP by IETF [RFC 6120-1]
  4. 4. Primitives XMPP Server XMPP Client XML XMPP Client XML XML XML <presence from=”” to=””/> <iq type=”get”> <query xmlns=”jabber:iq:roster”/> </iq> <message from=”” to=””> <body>Hello dude!</body> </message> [ ... ] <presence from=”” to=”” type=”unavailable”/> XMLStream Stanza
  5. 5. Usage Group Chat VOIP Whats app Gtalk Nimbuzz Instant Messaging GamingChesspark Collaboration VM Management ArchipelGeo-location Cisco WebEx Vehicle Tracking
  6. 6. vs. HTTP XMPP Server XMPP Server XMPP Client XMPP Client HTTP Server HTTP Server HTTP Client HTTP Client XMPP Asynchronous Federated Limited Purpose HTTP Synchronous Unfederated General Purpose vs.
  7. 7. Transports TCP Transmission Control Protocol BOSH Bidirectional stream Over Synchronous HTTP WebSocket Long Lived Connection Over HTTP Client(Pidgin/WhatsApp) Server(Ejabberd,Tigase) Open TCP Connection Open XML Stream Preferably Negotiate TLS Authenticate by SASL Exchange XML Packets Close XML Stream Close TCP Connection Client(Firefox/Chrome) Server(Ejabberd,Tigase) Open by HTTP Request Send XML Stanza ... Keep Alive ... Get XML Stanza Client(Firefox/Chrome) Server(Ejabberd,Tigase) Open by HTTP Request Upgrade to WebSocket WebSocket Handshake Open XML Stream Exchange XML Frames Close XML Stream Close WS Connection ... Keep Alive ... Send XML Stanza ... Keep Alive ...
  8. 8. DIRECT P2P Offer session & parameters Initiator ResponderXMPP Server - Application Type: RTP / Stub / ibb - Media Codec: Speex / G.711 / H.264 - Transport Method: - Streaming: ibb / S4b - datagram: raw-UDP / ICE-UDP Accept session & parameters TURN Server STUN Server TURN Server STUN Server NAT Get/Send public IP:Port Get/Send relay IP:Port Get/Send relay IP:Port Get/Send public IP:Port STUN P2P TURN RELAY Sym.NAT NATSym.NAT ICE Signaling Channel Media Exchange Channel XMPP Signaling Channel STUN: Session Traversal Utilities for NAT TURN: Traversal Using Relay around NAT ICE: Interactive Communication Establishment Jingle Terminate session Terminate session
  9. 9. Question?