SlideShare a Scribd company logo
1 of 15
XMPP in Real-Time Applications



             Ben Weaver
               @bwvr
       http://benweaver.com/
INTRODUCTION


 + What is XMPP?
 + Why is it “real-time”?
 + How does it work?
 + Where can you use it?
 + Conclusion
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.
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
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
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.
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.
HOW: OVERVIEW


 + XMPP comes in two parts.
   - Core: stream-level semantics
   - Jabber: use the Core for IM
 + XEP: make your XMPP extensions official.
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
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.
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>
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>
WHERE: CHAT


 + Chat example
 + <http://github.com/thisismedium/python-xmpp-server/
 blob/master/examples/chat-server.py>
CONCLUSION


 + Lot’s of people make clients; check it out!
 + Bi-directional
 + Event-driven
 + Works on the web
THE END




          Q&A

More Related Content

What's hot

Real life XMPP Instant Messaging
Real life XMPP Instant MessagingReal life XMPP Instant Messaging
Real life XMPP Instant MessagingMickaël Rémond
 
Interacting with XMPP using PHP
Interacting with XMPP using PHPInteracting with XMPP using PHP
Interacting with XMPP using PHPSudar Muthu
 
Realtime applications with EmberJS and XMPP
Realtime applications with EmberJS and XMPPRealtime applications with EmberJS and XMPP
Realtime applications with EmberJS and XMPPrjvegasf
 
Xmpp presentation
Xmpp presentationXmpp presentation
Xmpp presentationJava Pro
 
Scalable Apache for Beginners
Scalable Apache for BeginnersScalable Apache for Beginners
Scalable Apache for Beginnerswebhostingguy
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016Daniel Stenberg
 
Composite Source With Mule ESB
Composite Source With Mule ESBComposite Source With Mule ESB
Composite Source With Mule ESBJitendra Bafna
 
The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerVladimir Sedach
 
Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDYCotendo
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in LispVladimir Sedach
 
โครงสร้างและระบบเครือข่ายคอมพิวเตอร์
โครงสร้างและระบบเครือข่ายคอมพิวเตอร์โครงสร้างและระบบเครือข่ายคอมพิวเตอร์
โครงสร้างและระบบเครือข่ายคอมพิวเตอร์Kevalee Pichetpan
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streamingHung Thai Le
 

What's hot (19)

Real life XMPP Instant Messaging
Real life XMPP Instant MessagingReal life XMPP Instant Messaging
Real life XMPP Instant Messaging
 
XMPP 101
XMPP 101XMPP 101
XMPP 101
 
Interacting with XMPP using PHP
Interacting with XMPP using PHPInteracting with XMPP using PHP
Interacting with XMPP using PHP
 
Realtime applications with EmberJS and XMPP
Realtime applications with EmberJS and XMPPRealtime applications with EmberJS and XMPP
Realtime applications with EmberJS and XMPP
 
Xmpp presentation
Xmpp presentationXmpp presentation
Xmpp presentation
 
Scalable Apache for Beginners
Scalable Apache for BeginnersScalable Apache for Beginners
Scalable Apache for Beginners
 
OTR and XMPP
OTR and XMPPOTR and XMPP
OTR and XMPP
 
RPC protocols
RPC protocolsRPC protocols
RPC protocols
 
ScavengerEXA
ScavengerEXAScavengerEXA
ScavengerEXA
 
ExaBGP at LINX 83
ExaBGP at LINX 83ExaBGP at LINX 83
ExaBGP at LINX 83
 
SPDY
SPDY SPDY
SPDY
 
NullMQ @ PDX
NullMQ @ PDXNullMQ @ PDX
NullMQ @ PDX
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016
 
Composite Source With Mule ESB
Composite Source With Mule ESBComposite Source With Mule ESB
Composite Source With Mule ESB
 
The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compiler
 
Improving performance by changing the rules from fast to SPDY
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDY
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
 
โครงสร้างและระบบเครือข่ายคอมพิวเตอร์
โครงสร้างและระบบเครือข่ายคอมพิวเตอร์โครงสร้างและระบบเครือข่ายคอมพิวเตอร์
โครงสร้างและระบบเครือข่ายคอมพิวเตอร์
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 

Viewers also liked

The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPPJack Moffitt
 
Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...
Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...
Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...gogo6
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Servicesmattjive
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediatelyRussel Winder
 
Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoTAmit Dev
 
IPSN 2009 Contiki / uIP tutorial
IPSN 2009 Contiki / uIP tutorialIPSN 2009 Contiki / uIP tutorial
IPSN 2009 Contiki / uIP tutorialadamdunkels
 
Sirous Kavehercy GSM 3G CeeCom Convergence
Sirous Kavehercy GSM 3G CeeCom ConvergenceSirous Kavehercy GSM 3G CeeCom Convergence
Sirous Kavehercy GSM 3G CeeCom ConvergenceSirous Kavehercy
 
"Web Content Delivery Systems" - Gilbane Boston 2010
"Web Content Delivery Systems" - Gilbane Boston 2010"Web Content Delivery Systems" - Gilbane Boston 2010
"Web Content Delivery Systems" - Gilbane Boston 2010Blend Interactive
 
Screen Digest Letang Ec Study
Screen Digest  Letang  Ec StudyScreen Digest  Letang  Ec Study
Screen Digest Letang Ec Studyccivicosz
 
Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.Dingxin Xu
 
Mwlug 2016 BP108 The state of Instant Messaging Connectivity
Mwlug 2016 BP108 The state of Instant Messaging ConnectivityMwlug 2016 BP108 The state of Instant Messaging Connectivity
Mwlug 2016 BP108 The state of Instant Messaging ConnectivityAndy Higgins
 
Instantmessagingprotocols
InstantmessagingprotocolsInstantmessagingprotocols
Instantmessagingprotocolssanjoysanyal
 
LOLER Regulations 1998
LOLER Regulations 1998LOLER Regulations 1998
LOLER Regulations 1998mrmichaelcarr
 
Instant SMS: Bringing SMS to the next phase and increasing service revenues
Instant SMS: Bringing SMS to the next phase and increasing service revenuesInstant SMS: Bringing SMS to the next phase and increasing service revenues
Instant SMS: Bringing SMS to the next phase and increasing service revenuesRaúl Castañón Martínez
 
Secure instant messanger service
Secure instant messanger serviceSecure instant messanger service
Secure instant messanger serviceAditya Gupta
 

Viewers also liked (20)

The Real Time Web with XMPP
The Real Time Web with XMPPThe Real Time Web with XMPP
The Real Time Web with XMPP
 
Xmpp
XmppXmpp
Xmpp
 
Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...
Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...
Scaling the Web to Billions of Nodes: Towards the IPv6 “Internet of Things” b...
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
Switch to Python 3…now…immediately
Switch to Python 3…now…immediatelySwitch to Python 3…now…immediately
Switch to Python 3…now…immediately
 
Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoT
 
IoT transport protocols
IoT transport protocolsIoT transport protocols
IoT transport protocols
 
IPSN 2009 Contiki / uIP tutorial
IPSN 2009 Contiki / uIP tutorialIPSN 2009 Contiki / uIP tutorial
IPSN 2009 Contiki / uIP tutorial
 
Sirous Kavehercy GSM 3G CeeCom Convergence
Sirous Kavehercy GSM 3G CeeCom ConvergenceSirous Kavehercy GSM 3G CeeCom Convergence
Sirous Kavehercy GSM 3G CeeCom Convergence
 
"Web Content Delivery Systems" - Gilbane Boston 2010
"Web Content Delivery Systems" - Gilbane Boston 2010"Web Content Delivery Systems" - Gilbane Boston 2010
"Web Content Delivery Systems" - Gilbane Boston 2010
 
Screen Digest Letang Ec Study
Screen Digest  Letang  Ec StudyScreen Digest  Letang  Ec Study
Screen Digest Letang Ec Study
 
Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.
 
Mwlug 2016 BP108 The state of Instant Messaging Connectivity
Mwlug 2016 BP108 The state of Instant Messaging ConnectivityMwlug 2016 BP108 The state of Instant Messaging Connectivity
Mwlug 2016 BP108 The state of Instant Messaging Connectivity
 
Instantmessagingprotocols
InstantmessagingprotocolsInstantmessagingprotocols
Instantmessagingprotocols
 
LOLER Regulations 1998
LOLER Regulations 1998LOLER Regulations 1998
LOLER Regulations 1998
 
Instant SMS: Bringing SMS to the next phase and increasing service revenues
Instant SMS: Bringing SMS to the next phase and increasing service revenuesInstant SMS: Bringing SMS to the next phase and increasing service revenues
Instant SMS: Bringing SMS to the next phase and increasing service revenues
 
Secure instant messanger service
Secure instant messanger serviceSecure instant messanger service
Secure instant messanger service
 
Next-Gen Event Apps with AI Powered B2B Matchmaking
Next-Gen Event Apps with AI Powered B2B MatchmakingNext-Gen Event Apps with AI Powered B2B Matchmaking
Next-Gen Event Apps with AI Powered B2B Matchmaking
 
Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoT
 
Erlang White Label
Erlang White LabelErlang White Label
Erlang White Label
 

Similar to XMPP In Real Time

Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPGenora Infotech
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in MuleF K
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDIShahid Shaik
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIRajkattamuri
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelOpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelJosé Román Martín Gil
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web servicesNeil Ghosh
 
From zero to almost rails in about a million slides...
From zero to almost rails in about a million slides...From zero to almost rails in about a million slides...
From zero to almost rails in about a million slides...david_e_worth
 
Why we choose Symfony2
Why we choose Symfony2Why we choose Symfony2
Why we choose Symfony2Merixstudio
 
Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011Reuven Lerner
 
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Reuven Lerner
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservicesaba sumreen
 
Sending mail,web services
Sending mail,web servicesSending mail,web services
Sending mail,web servicesDevang Patel
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Conceptspasam suresh
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingApcera
 
Xke - Introduction to Apache Camel
Xke - Introduction to Apache CamelXke - Introduction to Apache Camel
Xke - Introduction to Apache CamelAlexis Kinsella
 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule EsbAnand kalla
 

Similar to XMPP In Real Time (20)

Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in Mule
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDI
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelOpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
 
WebServices
WebServicesWebServices
WebServices
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
From zero to almost rails in about a million slides...
From zero to almost rails in about a million slides...From zero to almost rails in about a million slides...
From zero to almost rails in about a million slides...
 
Why we choose Symfony2
Why we choose Symfony2Why we choose Symfony2
Why we choose Symfony2
 
Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011Modern Web Technologies — Jerusalem Web Professionals, January 2011
Modern Web Technologies — Jerusalem Web Professionals, January 2011
 
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
Modern Web technologies (and why you should care): Megacomm, Jerusalem, Febru...
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
 
Sending mail,web services
Sending mail,web servicesSending mail,web services
Sending mail,web services
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
soap toolkit
soap toolkitsoap toolkit
soap toolkit
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with Messaging
 
Xke - Introduction to Apache Camel
Xke - Introduction to Apache CamelXke - Introduction to Apache Camel
Xke - Introduction to Apache Camel
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule Esb
 
Code is art
Code is artCode is art
Code is art
 

Recently uploaded

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Recently uploaded (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

XMPP In Real Time

  • 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

Editor's Notes