Your SlideShare is downloading. ×
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Lecture about XMPP
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Lecture about XMPP

1,308

Published on

Lecture notes about XMPP. This lecture has been presented in 2012 in Bratislava, Slovakia at the Slovak University of Technology.

Lecture notes about XMPP. This lecture has been presented in 2012 in Bratislava, Slovakia at the Slovak University of Technology.

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,308
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
48
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Extensible Messaging and Presence Protocol Sebastian Schumann Slovak Telekom 5. December 2012 Bratislava, Slovakia
  • 2. About me ¡ Studied 2003 – 2007 telecommunications and computer sciences in Leipzig, Germany ¡ In Slovakia since 2006 ¡ Working for Slovak Telekom since 2007 ¡ Post-grad studies at Slovak University of Technology since 2007 ¡ Worked extensively with SIP/XMPP based presence and their possible integration
  • 3. Outline ¡ XMPP ¡ Introduction ¡ Architecture ¡ Protocol ¡ Usage ¡ IM, presence, multi-party interaction ¡ Publish/subscribe ¡ Jingle ¡ Discussion ¡ XMPP vs. SIP/SIMPLE ¡ Relevance
  • 4. Further reading ¡ This slide set is extended with content from the presentation of Remko Tronçon et. al.: “XMPP 101” ¡ http://el-tramo.be/blog/xmpp-101-fosdem/ ¡ Thank you for making your talk publicly available! ¡ The book “XMPP – The Definitive Guide” is excellent material by the authors of the XMPP standards. ¡ Yes, I bought it myself.
  • 5. Note! ¡ These slides only summarize the lecture. ¡ Take notes. ¡ Some slides are placeholders for work- ing on the white board, take care! ¡ Questions/Contributions/Criticism/Notes/Hints? ¡ Interrupt me any time!
  • 6. XMPP
  • 7. Origins (RFC 2778, RFC 2779) ¡ IETF defines general model for presence and instant messaging ¡ This model defines ¡ Presence service ¡ Instant messaging service ¡ Generic presence data model ¡ Requirements for instant messaging and presence (IMPP) systems are also described
  • 8. White board Term definition Presence service model, presence system Publish/Subscribe, Notify Watchers Instant Message Service Presence information
  • 9. IMPP implementations ¡ Based on IETF generic IMPP RFCs, several protocols are defined for delivering services ¡ Implementations are done by basic protocol and particular IMPP extension ¡ Base protocol ¡  SIP (RFC 3261) ¡  XMPP Core (RFC 3920) ¡ IMPP extension ¡  SIMPLE (RFC 3265) ¡  XMPP IM (RFC 3921)
  • 10. XMPP implementations ¡ To start with the relevance of the protocol, has anyone chatted with the following services? ¡ Google ¡ Facebook ¡ Cisco ¡ WhatsApp ¡ identi.ca ¡ Apple ¡ All are based on or use XMPP to some extend* * Some use a modification of the protocol.
  • 11. XMPP, the protocol ¡ Original name: Jabber (1998, by Jeremie Miller) ¡ Purely XML based protocol (for streaming XML) ¡ Comparison: SIP is based on HTTP ¡ Information is shared using a continuous XML stream transported over TCP ¡ SASL (Simple Authentication and Security Layer) and TLS (Transport Layer Security) used to secure stream ¡ Based on a few RFCs and extended by many XEPs ¡ XMPP Extension Protocol ¡ Comparison: SIP extended only through RFCs
  • 12. XMPP, the protocol ctd. ¡ XEPs make the protocol extensible ¡ XMPP is a decentralized, federated, asynchronous client-server protocol ¡ Sample messages <message from=’alice@hosted-im.fiit.ngnlab.eu/adium’ to=’ bob@hosted-im.fiit.ngnlab.eu' type='chat'> <body>Hello!</body> </message> <presence type=’busy'> <show>away</show> <status>Giving a lecture!</status> </presence>
  • 13. White board Architecture C2S, S2S, GW, FN/FC Comparison to HTTP, E-mail, SIP
  • 14. XMPP Architecture C1.1 C2.1S2S1 FC1FN1G1C1.2 C2S S2S
  • 15. Addresses ¡ Bare JID similar to E-mail address, identifying responsible user and domain ¡ alice@hosted-im.fiit.ngnlab.eu ¡ Full JID includes particular resource ¡ alice@hosted-im.fiit.ngnlab.eu/psi ¡ Jabber ID (JID) ¡ user@domain/resource ¡ DNS is used for service discovery ¡ SRV ¡ A
  • 16. White board Addressing DNS Client Port 5222/Server Port 5269
  • 17. DNS ¡ Link IP addresses with domain names ¡ Support in locating XMPP servers ¡ SRV lookup ¡ A/AAAA lookup ¡ SRV look-up indicates the domain and port the service listens on ¡  _xmpp-server._tcp.gmail.com. 900 IN SRV 5 0 5269 xmpp-server.l.google.com. ¡  _xmpp-client._tcp.gmail.com. 900 IN SRV 5 0 5222 xmpp.l.google.com ¡ A/AAAA to find the IP address of the domain name ¡  xmpp-server.l.google.com. 300 IN A 173.194.70.125
  • 18. Client vs. Server Communications ¡ XMPP uses different ports for client to server (c2s) and server to server (s2s) communications ¡ c2s: Port 5222 ¡ s2s: Port 5269 ¡ Same principle for s2s as for c2s ¡ Discovery ¡ XML streams ¡ No intermediate servers for federation (unlike E-mail) ¡ Similar security mechanisms (SASL, TLS)
  • 19. Usage
  • 20. IM, presence, multi-party interaction ¡ All “built in” the main standards ¡ Protocol ¡ “Normal” instant messaging ¡ IM ¡ Presence ¡ Rosters ¡ Initial presence ¡ Statuses ¡ Priorities ¡  Negative priority
  • 21. XMPP 101: Protocol deep-dive ¡ Streaming XML ¡ Slide 22 ¡ XMPP XML stanzas ¡ <message/> ¡ <presence/> ¡ <iq/> (Info/Query) ¡  Slides 23-28 ¡ Extensibility ¡ Slide 29
  • 22. XMPP 101: Protocol deep-dive ¡ Extensions ¡ Multi-User Chat ¡  Slide 37 ¡ PubSub ¡  Slide 40 ¡ Extended presence ¡  Slide 45
  • 23. Other aspects ¡ vCards (XEP-0054, RFC 2426) ¡ Server maintains vCard of users ¡ Service Discovery (disco) ¡ Entity: disco#items ¡ Features: disco#info ¡ Server features, client capabilities, etc. ¡ Roster ¡ Server configuration
  • 24. Other aspects ctd. ¡ Server components ¡ MUC (Multi-user chat) ¡ Foreign network gateways ¡ File Transfer ¡ BOSH (Bidirectional streams over synchronous HTTP) ¡ XMPP over HTTP ¡ Bots ¡ c2s, components
  • 25. Jingle (XEP-0166+) ¡ Set up multi-media sessions similarly to SIP ¡ Only session setup, no media transport ¡  Negotiate content ¡  Negotiate protocol (UDP, TCP) ¡ Streaming protocol (e.g. RTP) used to transport media ¡ Similar complexity as in SIP ¡ Different protocol/ports ¡ NAT traversal
  • 26. White board Jingle session setup Overlap: SIP messages
  • 27. Live tests ¡ Powered by from Process One ¡ Thank you! ¡ Domain ¡ hosted-im.fiit.ngnlab.eu ¡ Users ¡ Alice, Bob, Charlie, Dave ¡ Password ¡ fiit2012!lecture
  • 28. White board Stream setup Have a look at some stanzas Test presence, message, Jingle Test some server components (PubSub)
  • 29. Discussion
  • 30. XMPP vs. SIP/SIMPLE ¡ Which one is better? ¡ How have both historically developed to where they are now? ¡ Similarities/Differences ¡ Architecture ¡ Protocol ¡ Complexity ¡ Practical application
  • 31. XMPP vs. SIP Idea by Inaki Baz Castillo
  • 32. What can one build with XMPP? ¡ Many things J - needs differentiation ¡ Obvious examples ¡ Real-time communications system ¡ Messaging bus (PubSub) ¡ Yet another… ¡ RCS-e/Joyn? ¡ Facebook? ¡ E-mail? ¡ Gaming platform? ¡ Identity service? Your Ideas?!
  • 33. Relevance ¡ What is used these days? ¡ On the Internet ¡  Browser ¡  Mobile ¡  Clients ¡  Windows ¡  Mac ¡  Linux ¡ By operators ¡ Can SIP and XMPP be linked/connected?
  • 34. SIP/XMPP consolidation ¡ Joint paper published @ ONIT 2010 ¡  http://link.springer.com/chapter/10.1007%2F978-3-642-17851-1_70 ¡ An alternative approach to “SIP/SIMPLE vs. XMPP” and “Telco presence” ¡ Start point: current deployments ¡ Telephony: SIP ¡ IM/Presence: XMPP ¡ Requirements ¡ Use standard protocols (to re-use clients) ¡ Customers can keep current accounts in both worlds
  • 35. SIP/XMPP consolidation ctd.
  • 36. SIP/XMPP consolidation ctd. ¡ Telephone state extraction can be easily added to each infrastructure ¡ Enhanced SIP proxy that can extract call state information ¡ SIP call states must be converted to XMPP presence information ¡ XMPP as main IM/P protocol
  • 37. SIP/XMPP consolidation ctd.
  • 38. SIP/XMPP consolidation ctd.
  • 39. Summary ¡ A lot of open and/or free resources to follow up ¡ Programming libraries ¡ Clients, server – many open-source ¡ XMPP quite “under the radar” for now ¡ SIP gained a lot of attention w/ IMS, RCS-e, etc. in Telco ¡ Web 2.0 accelerated use of HTTP, esp. REST ¡ XMPP used, but not as “advocated” ¡ The Internet contains extensive material on XMPP ¡ This lecture was only an introduction! ¡ I hope it stimulated some ideas for future projects and helped in understanding communications a bit better.
  • 40. Sebastian Schumann mail@s-schumann.com @s_schumann sschumann Thank you!
  • 41. Download ¡ This lecture is available at http://bit.ly/fiit-xmpp
  • 42. References 1.  RFCs 2778, 2779, 3920, 3921. Various XEPs 2.  XMPP: The Definitive Guide. Peter Saint-Andre et.al. 3.  XMPP 101. Remko Tronçon http://www.slideshare.net/remko.troncon/xmpp-101 4.  Several own publications 5.  Graphics from Google Images, Open Clipart If you feel content where you hold the copyright is displayed within these slides and you do not like it, miss a link/reference, or want me to remove it altogether please let me know.

×