Your SlideShare is downloading. ×
0
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
XMPP In Real Time
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

XMPP In Real Time

5,308

Published on

This presentation gives an overview of XMPP and discusses using it in web applications.

This presentation gives an overview of XMPP and discusses using it in web applications.

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,308
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
124
Comments
0
Likes
6
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. XMPP in Real-Time Applications Ben Weaver @bwvr http://benweaver.com/
    • 2. INTRODUCTION + What is XMPP? + Why is it “real-time”? + How does it work? + Where can you use it? + Conclusion
    • 3. WHAT: OVERVIEW + XMPP is the Extensible Messaging and Presence Protocol + Routes messages among clients. + Broadcasts presence (status) to interested contacts. + The “X” in extensible is XML. + Since XML has namespaces... + You can invent new message types any time.
    • 4. WHAT: HISTORY + Back in 1998... + ICQ and AOL Instant Messenger were popular IM services. + Microsoft and Yahoo! were releasing their own. + Jeremie Miller started Jabber: community driven IM + Jabber standardization began in 1999 + In 2002, an IETF working group formalized XMPP
    • 5. WHAT: EXAMPLE <?xml version=“1.0”?> <stream to=“example.com”> <?xml version=“1.0”?> <stream from=“example.com”> <features> ... negotiate features ... <starttls /> <mechanisms /> </features> <message from=“juliet@example.com” to=“romeo@example.net”> <body>Art thou not Romeo...</body> </message> <message from=“romeo@example.net” to=“juliet@example.com”> <body>Art thou not Romeo...</body> </stream> </message> </stream> Client Server
    • 6. WHY: AJAX + I work on web sites and applications. + AJAX is a common technique used to improve experience. + Each call is a connection + HTTP request. - This is cumbersome when making frequent requests. - (Although, some browsers support Keep-Alive). + Communication is client-driven - Servers can’t push; polling adds overhead. - Awkward for web applications.
    • 7. WHY: BI-DIRECTIONAL + XMPP is a bi-directional stream. + XML stanzas add structure. + IQ stanzas provide REST-like semantics. + XMPP is “non-blocking”: use an event-driven style. + BOSH extends XMPP to the web.
    • 8. HOW: OVERVIEW + XMPP comes in two parts. - Core: stream-level semantics - Jabber: use the Core for IM + XEP: make your XMPP extensions official.
    • 9. HOW: CORE + RFC 3920 defines stream semantics. + Clients are identified as user@host/resource + <stream />: root element + <features />: bootstrap the stream - TLS: secure communication - SASL: flexible authentication + <message />: send a message + <iq id=“unique-token” type=“get|set|...” />: info query - Unique token identifies responses. - Body can be anything. + <presence />: broadcast your status
    • 10. HOW: INSTANT MESSAGE + RFC 3921 defines how IM works with the Core. + Each account has a roster. - Track clients connected through same account. - Store contacts and permissions. + Presence - States are defined. - Notification is regulated through rosters. + Message semantics are defined.
    • 11. HOW: EXTEND + A stream is a sequence of XML stanzas. + Invent new ones! + Submit an XMPP Extension Proposal (XEP). + Some examples: - Ping <http://xmpp.org/extensions/xep-0199.html> - Jingle <http://xmpp.org/extensions/xep-0166.html> - BOSH <http://xmpp.org/extensions/xep-0124.html>
    • 12. WHERE: WEB SERVICE + BOSH: Bi-directional streams over Synchronous HTTP + Like Comet + Define “HTML” semantics for XMPP stream. + Example: <http://github.com/thisismedium/python-xmpp- server/blob/master/examples/_bosh.py>
    • 13. WHERE: CHAT + Chat example + <http://github.com/thisismedium/python-xmpp-server/ blob/master/examples/chat-server.py>
    • 14. CONCLUSION + Lot’s of people make clients; check it out! + Bi-directional + Event-driven + Works on the web
    • 15. THE END Q&A

    ×