SlideShare a Scribd company logo
Real-Time Ruby for the Real-Time Webaka IM for web-applicationsIlya GrigorikCTO / PostRank
www.postrank.comwww.igvita.com@igrigorikBackground:  - PHP, Perl - Ruby + Rails from ‘06
Real-Time: the hype & the technologyReal-Time: the benefitsXMPPAMQPPSHBWebHooksRuby examplesReal-life applicationsFully buzzword compliant!The slides…Questions & CommentsMy blog
The Hype! Make it stop!
“Solution Exhibits Under 700 Nanoseconds of Latency for Inter-Process Communication Messaging”(micro/nano) secondsmilliseconds500ms is real-time enough to feel real-time for IM. secondsReal-time web is IM for web-servicesminutes / hoursReal-Time has many definitionsIt all depends on your context
+ New Applications+ Better Architecture
Many wasteful checksData?NoData?NoData?YesPolling: painful, wasteful
Real-time Ruby for the Real-time Web
Extensible Messaging and Presence Protocol
From: A, To: BHello!From: A, To: BHello!Extensible Messaging and Presence Protocol (XMPP)
Event-stream protocolPersistent connectionsPresenceXMPP FeaturesIdentity and authentication
UserDomainResourceilya@postrank.com/officeJabber Software FoundationJID: Federation, Identity  & Authentication
<message from="ilya@postrank.com/office" type="chat" to="ilya@igvita.com" id="aae1a"><body>hello</body><active xmlns="http://jabber.org/protocol/chatstates"/></message>Verbose protocol (XML)Example: Message Routing with XMPP
XMPP in the wild: Google Talk
XMPP in the wild: Google Talk + Video
Psi: cross-platform Jabber/XMPP client
require"rubygems"require"xmpp4r"jid=Jabber::JID::new("ilya@postrank.com")client=Jabber::Client.new(jid)client.connect("talk.google.com")client.auth("password")to = "ilya@aiderss.com"subject = "Jabber client"message = "Hello XMPP World!"piclient.sendJabber::Message::new(to, message).set_subject(subject)# <message to='ilya@igvita.com'>#   <body>Hello XMPP World!</body>#   <subject>Jabber client</subject># </message>XMPP4R (Ruby) Demo
require "rubygems"require "xmpp4r"jid= Jabber::JID::new("ilya@postrank.com")client = Jabber::Client.new(jid)client.connect("talk.google.com")client.auth("password")to = "ilya@postrank.com"subject = "Jabber client"message = "Hello XMPP World!"piclient.sendJabber::Message::new(to, message).set_subject(subject)# <message to='ilya@igvita.com'>#   <body>Hello XMPP World!</body>#   <subject>Jabber client</subject># </message>XMPP4R (Ruby) Demo
client.send(Jabber::Presence.new.set_type(:away))#  <presence from='daniel@aiderss.com/iMac8D2CB97D' to='ilya@postrank.com/0EDD826C' xmlns='jabber:client'>#    <show>away</show>#    <priority>0</priority>#    <x xmlns='http://www.apple.com/xmpp/idle'>#      <idle-since>2009-04-01T21:48:15Z</idle-since>#    </x>#  </presence>client.add_message_callbackdo|m|  puts  "#{m.from} -- #{m.body}"end# > daniel@postrank.com  -- Hey!Client Idle…XMPP4R (Ruby) Demo
client.send(Jabber::Presence.new.set_type(:available))#  <presence from='daniel@aiderss.com/iMac8D2CB97D' to='ilya@aiderss.com/0EDD826C' xmlns='jabber:client'>#    <show>away</show>#    <priority>0</priority>#    <x xmlns='http://www.apple.com/xmpp/idle'>#      <idle-since>2009-04-01T21:48:15Z</idle-since>#    </x>#  </presence>client.add_message_callbackdo|m|puts"#{m.from} -- #{m.body}"end# > daniel@postrank.com  -- Hey!Client Idle…XMPP4R (Ruby) Demo
One-to-many distribution + C2S
XEP-0060: Publish-Subscribe (Pubsub)
Persistent connectionSubscribeNew message!Publish-Subscribe
<iqtype='set‘ from='hamlet@denmark.lit/blogbot' to='pubsub.shakespeare.lit'id='pub1'><pubsubxmlns='http://jabber.org/protocol/pubsub'><publishnode='princely_musings'>      <item>        <entry xmlns='http://www.w3.org/2005/Atom'>          <title>Soliloquy<title>          <summary>To be, or not to be: that is the question!          <summary>          <link rel='alternate' type='text/html'href='http://denmark.lit/2003/12/13/atom03'/>          <id>tag:denmark.lit,2003:entry-32397</id>          <published>2003-12-13T18:30:02Z</published>          <updated>2003-12-13T18:30:02Z</updated>        </entry>      </item></publish></pubsub></iq>IQ StanzaPubSub Protocol: Client XML
<iq type='set‘ from='hamlet@denmark.lit/blogbot' to='pubsub.shakespeare.lit'id='pub1'>  <pubsubxmlns='http://jabber.org/protocol/pubsub'>    <publish node='princely_musings'><item><entryxmlns='http://www.w3.org/2005/Atom'><title>Soliloquy<title><summary>To be, or not to be: that is the question!<summary><linkrel='alternate'type='text/html' href='http://denmark.lit/2003/12/13/atom03'/><id>tag:denmark.lit,2003:entry-32397</id><published>2003-12-13T18:30:02Z</published><updated>2003-12-13T18:30:02Z</updated></entry></item>    </publish>  </pubsub></iq>AtomPubPubSub Protocol: Client XML
DistributeXEP-0060: Publish-Subscribe (Pubsub)Publish
<messagefrom='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo'><eventxmlns='http://jabber.org/protocol/pubsub#event'><itemsnode='princely_musings'><itemid='ae890ac52d0df67ed7cfdf51b644e901'>[...ENTRY...]</item></items></event></message><messagefrom='pubsub.shakespeare.lit' to='bernardo@denmark.lit' id='bar'><eventxmlns='http://jabber.org/protocol/pubsub#event'><itemsnode='princely_musings'><itemid='ae890ac52d0df67ed7cfdf51b644e901'>[...ENTRY...]</item></items></event></message>Subscriber ASubscriber BXEP-0060: Publish-Subscribe (Pubsub)
XMPPXMPPXMPPReal-time communication
Real-time Ruby for the Real-time Web
require'fire_hydrant'require'yaml'hydrant=FireHydrant.new(YAML.load(File.read("config.yml")))hydrant.on_location_updatedo|user|puts"#{user.token} has moved to #{user.locations.first}."endhydrant.run!Push notificationsRuby + FireEagle via XMPP
EjabberdErlangDjabberd			PerlOpenFire			JavaTigase			JavaDefacto XMPP serverRPM, GUI, shinyXMPP / Jabber Servers
Advanced Message Queuing Protocol (AMQP)
“AMQP is an open Internet Protocol for Business Messaging”AMQP Working Group (16 companies)
ConsumerAMQP BrokerAMQP ArchitecturePublisher
Broker ClusteringAMQP Clustering
Routing key:usd.stock.amzMessage: I like AMZ!Direct ExchangeTopic ExchangeFanout ExchangeAMQP Broker Internals
Routing key:usd.stock.amzMessage: I like AMZ!Direct ExchangeTopic ExchangeFanout ExchangeQueueName: amazonBind:usd.stock.amzAMQP Direct Exchange
Routing key:usd.stock.amzMessage: I like AMZ!Direct ExchangeTopic ExchangeFanout ExchangeQueueName: stocksBind:usd.stock.*AMQP Topic Exchange
Routing key:usd.stock.msftMessage: I like Microsoft! Direct ExchangeTopic ExchangeFanout ExchangeQueue Message: I like Microsoft! AMQP Topic Exchange
Routing key:usd.stock.msftMessage: I like Microsoft!Direct ExchangeTopic ExchangeFanout ExchangeQueue 2Name: stocksBind:“”Queue 1AMQP Fanout Exchange
Routing key: usd.stock.msftMessage: I like Microsoft! Direct ExchangeTopic ExchangeFanout ExchangeQueue 2Message: I like MicrosoftQueue 1AMQP Fanout Exchange
AMQP Kung-fu: Load-balancing
Routing key:usd.stock.amzMessage: I like AMZ! Direct ExchangeTopic ExchangeFanout ExchangeOnly one client gets the message!QueueAMQP Load Balancing
Bind:purchase.pdfGET/purchaseOKElastic AMQP Load-balancing
More AMQP Kung-fu:  - Pubsub  - Key routing  - Failover  - Instant feedback  - At least once, exactly-once  - …http://bit.ly/igvita-amqp
require'mq'AMQP.start(:host=>'amqp-server.com')domq=MQ.newmq.topic('stocks').publish("5.95",:key=>"usd.amz")endAMQP.start(:host => 'amqp-server.com') domq= MQ.newmq.queue(’stocks').bind(mq.topic('stocks'), :key => 'usd.*').subscribe{ |price|      print ’stock quote: ', price}endPublisherAMQP + Ruby Example
require 'mq'AMQP.start(:host => 'amqp-server.com') domq= MQ.newmq.topic('stocks').publish("5.95", :key => "usd.amz")end  AMQP.start(:host=>'amqp-server.com')domq=MQ.newmq.queue(‘stocks').bind(mq.topic('stocks'),:key=>'usd.*').subscribe{|price|print‘stock quote: ',price}endConsumerAMQP + Ruby Example
Real-time Ruby for the Real-time Web
http://blog.webhooks.org/2009/04/23/slides-from-pivotal-labs-talk/WebHooks:Pattern for enabling user-defined callbacks in web-applications
http://blog.webhooks.org/2009/04/23/slides-from-pivotal-labs-talk/WebHooks @ PayPal
http://blog.webhooks.org/2009/04/23/slides-from-pivotal-labs-talk//register  http://callback-1.com/register  http://callback-2.com1okhttp://blog.webhooks.org/2009/04/23/slides-from-pivotal-labs-talk//post  Hello World!2ok/post  Hello World!http://callback-1.com3http://callback-2.comWebHooks Workflow/post  Hello World!
WebHooks WorkflowWebHooks @ GitHub
Rails ActiveRecord  + WebHooks
http://github.com/jcapote/watercoolr-> POST /channels← { 'id':'2d0128d' }1-> POST /subscribers data={    'channel':'2d0128d',     'url':'http://api.calback.com/handler' }← { 'status': 'OK' }2you -> POST /messages data={ 'channel':'2d0128d', 'message':'hey guys!' }watercoolr -> POSThttp://api.callback.com/handler data='hey guys!'   ...for every subscriber...← { 'status': 'OK' }3Watercoolr: Ruby WebHooks Servervia a simple Sinatra app
require'rubygems'require'rest_client'require'json'# ruby postbin.rb http://www.postbin.org/1j11vypputs "creating channel..."resp=RestClient.post'http://watercoolr.appspot.com/channels', :data => ''id =JSON.parse(resp)["id"]puts "adding subscriber to channel #{id}"resp = RestClient.post 'http://watercoolr.appspot.com/subscribers',                 :data => { :channel => id, :url => ARGV[0] }.to_jsonputs resp # {"status":"OK"}puts "posting message to #{id}"resp = RestClient.post 'http://watercoolr.appspot.com/messages',                 :data => { :channel => id, :message => 'Hello World' }.to_jsonputs resp # {"status":"OK"}Watercoolr on Google App EngineDataMapper + Sinatra + Jruby
require'rubygems'require'rest_client'require'json'# ruby postbin.rb http://www.postbin.org/1j11vypputs "creating channel..."resp = RestClient.post 'http://watercoolr.appspot.com/channels', :data => ''id = JSON.parse(resp)["id"]puts "adding subscriber to channel #{id}"resp=RestClient.post'http://watercoolr.appspot.com/subscribers', :data => { :channel => id, :url => ARGV[0] }.to_jsonputs resp# {"status":"OK"}puts "posting message to #{id}"resp = RestClient.post 'http://watercoolr.appspot.com/messages',                 :data => { :channel => id, :message => 'Hello World' }.to_jsonputs resp # {"status":"OK"}Watercoolr on Google App EngineDataMapper + Sinatra + Jruby
require'rubygems'require'rest_client'require'json'# ruby postbin.rb http://www.postbin.org/1j11vypputs "creating channel..."resp = RestClient.post 'http://watercoolr.appspot.com/channels', :data => ''id = JSON.parse(resp)["id"]puts "adding subscriber to channel #{id}"resp = RestClient.post 'http://watercoolr.appspot.com/subscribers',                 :data => { :channel => id, :url => ARGV[0] }.to_jsonputs resp # {"status":"OK"}puts "posting message to #{id}"resp=RestClient.post'http://watercoolr.appspot.com/messages', :data => { :channel => id, :message => 'Hello World' }.to_jsonputs resp# {"status":"OK"}Watercoolr on Google App EngineDataMapper + Sinatra + Jruby
http://bit.ly/igvita-watercoolrhttp://www.github.com/igrigorik/watercoolrhttp://www.postbin.orgPOST’ing to PostBingreat debugging tool
PubSub over HTTPbasically, WebHooks…
“A simple, open, server-to-server web-hook-based pubsub (publish/subscribe) protocol as an extension to Atom and RSS.”“Parties (servers) speaking the PubSubHubbub protocol can get near-instant notifications (via webhook callbacks) when a topic (feed URL) they're interested in is updated.” http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.2.htmlhttp://docs.google.com/present/view?id=ajd8t6gk4mh2_34dvbpchfs+Spec’edPubSub Protocol+  Deployed & Available+  XML Transport  -  XML Transport-  Not as general purpose-  No firehose
12
34
PSHB in the WildGoogle, Typepad, Wordpress…
require'pubsubhubbub'EventMachine.run {  hub =EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/')# subscribe to real-time notificationshub.subscribe"http://blog.yoursite.com/atom.xml", "http://yourhub.com/hubbub”# unsubscribe hub.unsubscribe "http://blog.yoursite.com/atom.xml", "http://yourhub.com/hubbub”hub.callback { puts "Processed" }hub.errback  { puts "Error! " + hub.response_header.status.to_s }}Consuming PSHB in Rubygem install pubsubhubbub
require'pubsubhubbub'EventMachine.run {  hub =EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/')# subscribe to real-time notificationshub.subscribe "http://blog.yoursite.com/atom.xml", "http://yourhub.com/hubbub”# unsubscribe hub.unsubscribe"http://blog.yoursite.com/atom.xml", "http://yourhub.com/hubbub”hub.callback { puts "Processed" }hub.errback  { puts "Error! " + hub.response_header.status.to_s }}Consuming PSHB in Rubygem install pubsubhubbub
require'pubsubhubbub'EventMachine.run {  hub =EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/')  # subscribe to real-time notificationshub.subscribe "http://blog.yoursite.com/atom.xml", "http://yourhub.com/hubbub”  # unsubscribe hub.unsubscribe "http://blog.yoursite.com/atom.xml", "http://yourhub.com/hubbub”hub.callback { puts "Processed" }hub.errback  { puts "Error! "+hub.response_header.status.to_s }}Consuming PSHB in Rubygem install pubsubhubbub
require'pubsubhubbub'EventMachine.run {  hub =EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/publish')# publish notification to all subscribershub.publish ['http://www.test.com', 'http://www.test.com/2']hub.callback { puts "Notified PSHB Hub" }hub.errback  { puts "Notification failed" + hub.response_header.status.to_s }  }Publishing PSHB in Rubygem install pubsubhubbub
require'pubsubhubbub'EventMachine.run {  hub =EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/publish')# publish notification to all subscribershub.publish ['http://www.test.com', 'http://www.test.com/2']hub.callback { puts "Notified PSHB Hub" }hub.errback  { puts "Notification failed"+hub.response_header.status.to_s }  }Publishing PSHB in Rubygem install pubsubhubbub
http://github.com/igrigorik/pubsubhubbub
Real-Time Web = “IM for web applications”XMPP  :  PresenceAMQP :  RoutingWebHooks:  ExtensibilityPubsubHubbub:  PubSub over HTTP
Related Blog Posts:http://bit.ly/igvita-amqphttp://bit.ly/igvita-webhookshttp://bit.ly/igvita-pshbQuestions?The slides…Questions & CommentsMy blog

More Related Content

PPTX
Ruby in the Browser - RubyConf 2011
ODP
Riereta Node.js session 3 (with notes)
PDF
Pagespeed what, why, and how it works
KEY
A rough guide to JavaScript Performance
PPT
Web::Scraper
PDF
Infrastructure as code might be literally impossible / Joe Domato (packageclo...
PPTX
Real-Time Web applications with WebSockets
PDF
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
Ruby in the Browser - RubyConf 2011
Riereta Node.js session 3 (with notes)
Pagespeed what, why, and how it works
A rough guide to JavaScript Performance
Web::Scraper
Infrastructure as code might be literally impossible / Joe Domato (packageclo...
Real-Time Web applications with WebSockets
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019

What's hot (20)

PDF
Don't make me wait! or Building High-Performance Web Applications
PPT
scaling compiled applications - highload 2013
PDF
Building Realtime Apps with Ember.js and WebSockets
PPTX
HTML5 Real-Time and Connectivity
PPT
Ajax to the Moon
PPT
Pragmatics of Declarative Ajax
PDF
PPTX
Xdebug, KCacheGrind and Webgrind with WampServer
PDF
Making the web faster
PPTX
What is HTML 5?
PDF
Ajax Tutorial
PPT
Ruby application based on http
PDF
Migrating existing monolith to serverless in 8 steps
PDF
Essential open source tools for serverless developers
PPT
The Once And Future Script Loader (v2)
DOCX
Basics of node.js
PDF
Building a Single Page Application using Ember.js ... for fun and profit
PDF
Chef Conf 2015: Package Management & Chef
PDF
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
PDF
Progressive Enhancement
Don't make me wait! or Building High-Performance Web Applications
scaling compiled applications - highload 2013
Building Realtime Apps with Ember.js and WebSockets
HTML5 Real-Time and Connectivity
Ajax to the Moon
Pragmatics of Declarative Ajax
Xdebug, KCacheGrind and Webgrind with WampServer
Making the web faster
What is HTML 5?
Ajax Tutorial
Ruby application based on http
Migrating existing monolith to serverless in 8 steps
Essential open source tools for serverless developers
The Once And Future Script Loader (v2)
Basics of node.js
Building a Single Page Application using Ember.js ... for fun and profit
Chef Conf 2015: Package Management & Chef
Drupal 8: Huge wins, a Bigger Community, and why you (and I) will Love it
Progressive Enhancement
Ad

Similar to Real-time Ruby for the Real-time Web (20)

ODP
Djabot – Python Jabber Bot
PPT
Lecture 3 - Comm Lab: Web @ ITP
PPT
Improving Soap Message Serialization
PPT
An Introduction to Solr
PPT
XML and Web Services with PHP5 and PEAR
PPTX
XMPP, TV and the Semantic Web
PPSX
Putting SOAP to REST
PPT
Evolution of API With Blogging
ODP
Real time web (Orbited) at BCNE3
ZIP
XMPP - Beyond IM
PPT
Lecture1 B Frames&Forms
ODP
Comet web applications with Python, Django & Orbited
PPT
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
PPT
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
ODP
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
PPTX
Internet protocalls & WCF/DReAM
PPT
RDFa: The Semantic Web's Missing Link
PPT
Develop webservice in PHP
PPTX
DevDays09 Internet Explorer 8
ODP
Architecting Web Services
Djabot – Python Jabber Bot
Lecture 3 - Comm Lab: Web @ ITP
Improving Soap Message Serialization
An Introduction to Solr
XML and Web Services with PHP5 and PEAR
XMPP, TV and the Semantic Web
Putting SOAP to REST
Evolution of API With Blogging
Real time web (Orbited) at BCNE3
XMPP - Beyond IM
Lecture1 B Frames&Forms
Comet web applications with Python, Django & Orbited
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
Living in the Cloud: Hosting Data & Apps Using the Google Infrastructure
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
Internet protocalls & WCF/DReAM
RDFa: The Semantic Web's Missing Link
Develop webservice in PHP
DevDays09 Internet Explorer 8
Architecting Web Services
Ad

More from Ilya Grigorik (14)

PDF
Making the web fast(er) - RailsConf 2012
PPTX
0-60 with Goliath: High performance web services
PPTX
0-60 with Goliath: Building High Performance Ruby Web-Services
PPTX
Intelligent Ruby + Machine Learning
PPTX
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
PPTX
No Callbacks, No Threads - RailsConf 2010
PPTX
Ruby C10K: High Performance Networking - RubyKaigi '09
PPTX
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
PPTX
Leveraging Social Media - Strategies & Tactics - PostRank
PPTX
Ruby Proxies for Scale, Performance, and Monitoring
PPTX
Building Mini Google in Ruby
PPT
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
PPTX
Event Driven Architecture - MeshU - Ilya Grigorik
PPT
Taming The RSS Beast
Making the web fast(er) - RailsConf 2012
0-60 with Goliath: High performance web services
0-60 with Goliath: Building High Performance Ruby Web-Services
Intelligent Ruby + Machine Learning
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No Callbacks, No Threads - RailsConf 2010
Ruby C10K: High Performance Networking - RubyKaigi '09
Lean & Mean Tokyo Cabinet Recipes (with Lua) - FutureRuby '09
Leveraging Social Media - Strategies & Tactics - PostRank
Ruby Proxies for Scale, Performance, and Monitoring
Building Mini Google in Ruby
Ruby Proxies for Scale, Performance, and Monitoring - GoGaRuCo - igvita.com
Event Driven Architecture - MeshU - Ilya Grigorik
Taming The RSS Beast

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology

Real-time Ruby for the Real-time Web

Editor's Notes

  • #13: ResourceFederationClient to Server <> Server to ServerJabber.orgis the original IM service based on XMPP, the open standard for instant messaging. The service is run by a small group of volunteers. For that reason, you’ll often find people using Jabber and XMPP as synonyms. For all intents and purposes though, they are exactly the same. Having said that, each XMPP user has a “JID” or “Jabber ID”, which captures the following components: user, domain and resource.If you discard the resource component for a second, you’re left with an email address! Hence, as you may guess, the user identification and authentication will be done by a jabber server running on aiderss.com. And then the resource component simply assigns a unique handle, or location for that user. Unlike SMTP, which is stateless, we can have multiple clients be connected to our jabber server, which means we need a unique ID for each one.
  • #16: XMPP is also not limited to routing text snippets. Recently, Google integrated video chat into their products, once again, using XMPP. You can use XMPP to transfer binary files, real-time video, or anything else that your heart desires (not that it’s a necessarily good idea to do that though).
  • #30: Fire eagle exposes an XMPP endpoint which anyone can consume to receive your location updates. This saves them a lot of bandwidth and server resources, since the clients don’t have to poll for updates!
  • #32: Another interesting and fairly popular use for XMPP is the dynamic scalability. Instead of trying to build your own glue to detect and register new servers in the cloud, you could use XMPP and presence to solve this for you: whenever a server comes online, it logs into the XMPP server announcing it’s presence as available. Under load? Set it to “do not disturb”. If the server falls off the network, the XMPP server will detect that and remove it from its roster.