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.

XMPP Technical Overview + Jingle Protocol Study

1,750 views

Published on

A 20 minutes technical overview of the XMPP technology (protocol, extension and ecosystem).

A case study is done on the Jingle protocol.

Published in: Technology
  • Be the first to comment

XMPP Technical Overview + Jingle Protocol Study

  1. 1. Ever used WhatsApp or Google Cloud Messaging?
  2. 2. Ever wondered which protocol lies behind it?
  3. 3. That’s a chat protocol.
  4. 4. Open Source
  5. 5. Standardized
  6. 6. Decentralized
  7. 7. Interoperable
  8. 8. Encrypted
  9. 9. Extensible
  10. 10. Goals?
  11. 11. Origins?
  12. 12. XMPP Architecture
  13. 13. XMPP Architecture jappix.com jabber.org talkr.im
  14. 14. XMPP Architecture jappix.com jabber.org talkr.im
  15. 15. XMPP Architecture jappix.com jabber.org talkr.im Server to server TCP 5269 Outbound + Inbound
  16. 16. XMPP Architecture jappix.com jabber.org talkr.im gmail.com googlemail.com
  17. 17. XMPP Architecture jappix.com jabber.org talkr.im gmail.com googlemail.com
  18. 18. XMPP Architecture jappix.com jabber.org talkr.im Not encrypted PLAIN gmail.com googlemail.com Encrypted TLS v1.0+ NO SSL (v3-)
  19. 19. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im
  20. 20. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im Pidgin Beem Adium Jappix IM+ IM+
  21. 21. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im Pidgin Beem Adium Jappix IM+ IM+ Client to server TCP 5222 Outbound + Inbound
  22. 22. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im Pidgin Beem Adium Jappix IM+ IM+ Web to proxy to server TCP 5280 Outbound + Inbound
  23. 23. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im Pidgin Beemjane@talkr.im/Computer jane@talkr.im/Mobile Adium valerian@jappix.com/Mac john@jabber.org/Jappix Web Jappix IM+ valerian@jappix.com/iPhone IM+ valerian@jappix.com/iPad
  24. 24. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im Pidgin Beemjane@talkr.im/Computer jane@talkr.im/Mobile Adium valerian@jappix.com/Mac john@jabber.org/Jappix Web Jappix IM+ valerian@jappix.com/iPhone IM+ valerian@jappix.com/iPad
  25. 25. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im howard@talkr.im fiona@talkr.im julien@jappix.com +25K users tim@jabber.org
  26. 26. XMPP Architecture jappix.com jabber.org talkr.im valerian@jappix.com john@jabber.org jane@talkr.im howard@talkr.im fiona@talkr.im julien@jappix.com +25K users tim@jabber.org gmail.com +425M users! googlemail.com
  27. 27. XMPP Architecture jappix.com
  28. 28. XMPP Architecture jappix.com muc.jappix.com pubsub.jappix.com vjud.jappix.com XMPP Components websocket.jappix.com
  29. 29. XMPP Architecture jappix.com muc.jappix.com pubsub.jappix.com vjud.jappix.com XMPP Components XMPP Gateways skype.jappix.com msn.jappix.com websocket.jappix.com
  30. 30. XMPP Architecture jappix.com muc.jappix.com pubsub.jappix.com vjud.jappix.com XMPP Components XMPP Gateways skype.jappix.com msn.jappix.com Non-XMPP services stun.jappix.com turn.jappix.com websocket.jappix.com
  31. 31. XMPP Architecture Security watchdog
  32. 32. XMPP Architecture Everything is a node Server = node Gateway = node Client = node Bot = node Component = node
  33. 33. XMPP Architecture Server => TCP 5269 Client => TCP 5222 HTTP services => TCP 5280
  34. 34. XMPP Architecture 1 node = 1 JID = “1 phone number”
  35. 35. XMPP Architecture Full JID = user@domain.tld/resource Bare JID = user@domain.tld
  36. 36. XMPP Architecture Stanza = XMPP XML node
  37. 37. XMPP Architecture to = sender user from = receiving user type = stanza purpose id = stanza identifier
  38. 38. XMPP Core Standardized - IETF RFC
  39. 39. XMPP Core <message />
  40. 40. XMPP Core <message     type=‘chat’        from=‘valerian@jappix.com/Mac’     to=‘hector@jabber.ru/Gajim’     id=‘sz_ab_11’>   <body>Hello buddy!</body> </message>
  41. 41. XMPP Core <presence />
  42. 42. XMPP Core <presence     type=‘available’        to=‘valerian@jappix.com‘     id=‘sz_ab_12’>   <show>away</show> </presence>
  43. 43. XMPP Core <iq />
  44. 44. XMPP Core <iq     type='get'     from=‘valerian@jappix.com/iPhone‘     to='julien@jappix.com/Jappix'     id=‘sz_ab_292’>   <query xmlns='jabber:iq:version'/> </iq>
  45. 45. STREAM
  46. 46. S STREAM
  47. 47. R STREAM
  48. 48. R STREAM
  49. 49. S STREAM
  50. 50. R STREAM
  51. 51. S STREAM
  52. 52. STREAM R
  53. 53. BINDING
  54. 54. S BINDING
  55. 55. BINDING R
  56. 56. R BINDING
  57. 57. S BINDING
  58. 58. R BINDING
  59. 59. S BINDING
  60. 60. CLOSING
  61. 61. CLOSING S
  62. 62. XMPP EXtensions aka ‘XEP’
  63. 63. XEP Types Procedural Standards Track Historical Informational Humorous XMPP Extensions
  64. 64. XEP Statuses Active Draft Obsolete DeprecatedDeferred Experimental Final Proposed Rejected Retracted XMPP Extensions
  65. 65. 357 total XMPP Extensions
  66. 66. XEP-0166 Draft Standards Track XMPP Extensions
  67. 67. Jingle RTP Sessions XEP-0167 Draft Standards Track XMPP Extensions
  68. 68. Jingle ICE-UDP Transport Method XEP-0176 Draft Standards Track XMPP Extensions
  69. 69. Use of ZRTP in Jingle RTP Sessions XEP-0262 Draft Standards Track XMPP Extensions
  70. 70. Case study XMPP Extensions Romeo calls Juliet
  71. 71. Jingle session flow
  72. 72. session-initiate Romeo Juliet session inactive
  73. 73. STEP 1 Romeo Juliet session-initiate session-initiate
  74. 74. STEP 2 session-initiate ACK Romeo Juliet session-initiate
  75. 75. STEP 3 Romeo Juliet session-initiate ACK session-info session-info
  76. 76. STEP 4 Romeo Juliet session-initiate ACK session-info session-info ACK
  77. 77. Romeo Juliet session-initiate ACK session-info session-info ACK RINGING…
  78. 78. STEP 5 session-accept Romeo Juliet session-initiate ACK session-accept session-info ACK
  79. 79. STEP 6 session-accept Romeo Juliet session-initiate ACK session-accept ACK session-info ACK
  80. 80. session-accept Romeo Juliet session-initiate ACK session-accept ACK session-info ACK session established
  81. 81. RTC stream now flowing… Audio/video session is established
  82. 82. Ending the call Juliet wants to stop the call (properly)
  83. 83. STEP 1 session-terminate Romeo Juliet session-terminate Previous flow
  84. 84. STEP 2 Romeo Juliet Previous flow ACK session-terminate session-terminate
  85. 85. Romeo Juliet Previous flow ACK session ended session-terminate session-terminate
  86. 86. Stanzas exchanged
  87. 87. S STANZA
  88. 88. R STANZA
  89. 89. R STANZA
  90. 90. S STANZA
  91. 91. S STANZA
  92. 92. R STANZA
  93. 93. Testing with Chromium
  94. 94. Giggle.js 20K lines of JavaScript TEST WebRTC <> Jingle/XMPP
  95. 95. TEST
  96. 96. TEST
  97. 97. XMPP Ecosystem Servers, libs, clients, companies
  98. 98. XMPP Ecosystem
  99. 99. XMPP Ecosystem
  100. 100. XMPP Ecosystem
  101. 101. XMPP Ecosystem Erlang
  102. 102. XMPP Ecosystem Lua Erlang
  103. 103. XMPP Ecosystem Erlang Lua Java
  104. 104. XMPP Ecosystem
  105. 105. XMPP Ecosystem
  106. 106. XMPP Ecosystem JavaScript JSJaC Strophe.js Python pyxmpp jabber.py Ruby Babylon Blather C++ dxmpp gloox
  107. 107. XMPP Ecosystem XMPP JavaScript <iq type='get' id=‘jsjac_23’>   <prefs xmlns='urn:xmpp:mam:0'/> </iq> JSJaC.js
  108. 108. Now mostly geeky Future can help unify communications, trash PSTN avoid communications to be PSTN-dependant
  109. 109. Questions?
  110. 110. Thanks! Jappix - jappix.com XMPP - xmpp.org Giggle.js - github.com/valeriansaliou/giggle

×