SlideShare a Scribd company logo
Building Event Based
Systems for the Real-
     Time Web
          Paul Dix
      http://pauldix.net
          @pauldix
joiseyshowaa (http://www.flickr.com/photos/30201239@N00/3916914747/)
co-founder and CTO
Building Event-Based Systems for the Real-Time Web
The Talk
Event Based:
data update => do something
Batch:
need data => calculate
Real-Time:
data update => notification
Scheduled:
occasionally => do stuff
Event Based == Real Time
Monolithic




  American Backroom (http://www.flickr.com/photos/41922098@N03/4247207167/)
Loosely
Coupled




 alles-schlumpf (http://www.flickr.com/photos/29487767@N02/2855271953/)
Scale




 'Playingwithbrushes' (http://www.flickr.com/photos/82518118@N00/2280744328/)
Scale with Complexity

PhOtOnQuAnTiQuE (http://www.flickr.com/photos/67968452@N00/1876685709/)
Scale with Team Size
alexkess (http://www.flickr.com/photos/34838158@N00/3370167184/)
Definition by Example
SQL Databases
events:
insert, update, delete

execution:
before, after, instead of




                            Event Based:
                              triggers
Batch:
count, sum, min, max
Real-Time?
counter cache
Scheduled?
cron, at, schtasks
Broken




nickwheeleroz (http://www.flickr.com/photos/nickwheeleroz/2474196275/in/photostream/)
Self Contained
Monolithic
Bad!




Road Fun (http://www.flickr.com/photos/21849473@N06/2550339131/)
Doesn’t
 Scale




Darwin Bell (http://www.flickr.com/photos/53611153@N00/465459020/)
Distributed Systems
cygnoir (http://www.flickr.com/photos/35034356212@N01/163671482/)
Event Based:
messaging, publish
 subscribe, amqp
Batch:
MapReduce, Hadoop
Real-Time:
messaging, publish/
    subscribe
Scheduled:
delayed replication, data
        backups
The Web
cygnoir (http://www.flickr.com/photos/35034356212@N01/163671482/)
Event Based:
     web hooks,
pubsubhubub, rsscloud
Batch:
polling
Real-Time:
   web hooks, web
sockets, pubsubhubbub,
       rsscloud
Scheduled:
check every 1 hour
Distributed (internal)
       Systems
Service Calls
Feed Reader (on fetch)
Feed Reader (on fetch)


• Update users reading list
Feed Reader (on fetch)


• Update users reading list
• Language Identification
Feed Reader (on fetch)

• Update users reading list
• Language Identification
• Named Entity Extraction
Feed Reader (on fetch)

• Update users reading list
• Language Identification
• Named Entity Extraction
• Cluster with other Articles
Feed Reader (on fetch)

• Update users reading list
• Language Identification
• Named Entity Extraction
• Cluster with other Articles
• Identify Trending Entities
Tightly
Coupled




Steve aka Crispin Swan (http://www.flickr.com/photos/26811962@N05/3704553536/)
Alejandro Groenewold (http://www.flickr.com/photos/17618485@N07/3294535473/)
Publish/Subscribe
    (pubsub)
RabbitMQ
AMQP
Exchanges
Queues
Bindings
Routing Key
Exchange Type
Topic Exchange
<token>.<token>...
# - 0 or more wildcard
* - 1 wildcard
Building Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time Web
Include Data in the
      Message
Data is the API
Another Example:
  error logging
routing key:
domU-12-31-39-07.feed_fetcher
binding:
*.feed_fetcher
binding:
   #
Loosely
                                     Coupled




° ρЯίтΛм ° (http://www.flickr.com/photos/39046851@N08/3829500850/)
Programmable Web 2.0
Event-Based
Real-Time
Web Hooks
GitHub
Post-Receive Hooks
Building Event-Based Systems for the Real-Time Web
git push triggers hooks
POST to Post-Recieve
       URLs
{
    "before": "5aef35982fb2d34e9d9d4502f6ede1072793222d",
    "repository": {
       "url": "http://github.com/defunkt/github",
       "name": "github",
       "description": "You're lookin' at it.",
       "watchers": 5,
       "forks": 2,
       "private": 1,
       "owner": {
         "email": "chris@ozmm.org",
         "name": "defunkt"
       }
    },
    "commits": [
       {
         "id": "41a212ee83ca127e3c8cf465891ab7216a705f59",
         "url": "http://github.com/defunkt/github/commit/41a212ee83ca127e3
         "author": {
            "email": "chris@ozmm.org",
            "name": "Chris Wanstrath"
         },
         "message": "okay i give in",
         "timestamp": "2008-02-15T14:57:17-08:00",
Data is the API
Continuous Integration
Bug Tracking
Campfire
Continuous
Deployment
PubSubHubbub
RSS or Atom Feed
<link rel=”hub” href=”http://pubsubhubbub.appspot.com/”>
Subscriber tells Hub
Hub verifies with
  Subscriber
Publisher notifies Hub
Hub gets from
  Publisher
Hub sends to
 Subscribers
Data is the API
OAuth + Web Hooks
Concerns
don’t make web-hook
callbacks while a user is
waiting




                            Responsive
what if the subscriber
doesn’t respond?

retry logic
notifications




                         Retries
use OAuth.
SSL for sensitive data




                         Security
Possibilities
Real-Time
Event Based
Communication
Are these really real-
       time?
Data Consistency
in brewer’s CAP theorem he talked
about the relationship bet ween three
requirements when building
distributed systems. consistency,
availability, and partition tolerance.




               Eric Brewer’s CAP
                    theorem
consistency means that an
operation either works completely
or fails. this is also referred to as
atomic.

Bug tracker example.




                             consistency
availability is pretty self
explanatory. a service is
available to ser ve requests.

Twitter example




                            availability
when you replicate data across multiple
systems, you create the possibility of forming
a partition. this happens when one or more
systems lose connectivity to other systems.
partition tolerance is defined formally as “no
set of failures less than total net work failure
is allowed to cause the system to respond
incorrectly”




              partition tolerance
pick two
Can have all three

“is a special form of weak
consistency. if no new updates are
made to an object, eventually all
accesses will return the last
updated value.”




            Werner Vogels’
          eventual consistency
Building Event-Based Systems for the Real-Time Web
Building Event-Based Systems for the Real-Time Web
Design Around Eventual
     Consistency
In Closing...
Event-Based == Real Time
Pubsub
Loosely Coupled
Expose Data
Third Party
Programmers
Extend and Improve
many heads are better...




         shoothead (http://www.flickr.com/photos/66621443@N00/519240547/)
than one.




            John Spooner (http://www.flickr.com/photos/29809546@N00/315157691/)
Questions?
     Paul Dix
 http://pauldix.net
     @pauldix

More Related Content

What's hot (20)

PDF
DevSec Defense
Daniel Bohannon
 
PDF
Malicious Payloads vs Deep Visibility: A PowerShell Story
Daniel Bohannon
 
PDF
How WebHooks Will Make Us All Programmers
Jeff Lindsay
 
PDF
Building Twitter's SDKs for Android
Andy Piper
 
PDF
Cross Domain Web
Mashups with JQuery and Google App Engine
Andy McKay
 
PDF
APIs That Make Things Happen
Jeff Lindsay
 
PDF
Extending spring
Joshua Long
 
PPTX
CouchDB Day NYC 2017: Mango
IBM Cloud Data Services
 
PDF
Asynchronous WordPress
Aaron Brazell
 
PDF
Asynchronous WordPress
Aaron Brazell
 
PDF
Pydata-Python tools for webscraping
Jose Manuel Ortega Candel
 
PDF
Beating Python's GIL to Max Out Your CPUs
Andrew Montalenti
 
PDF
Brisbane DevOps Meetup - Logstash
pczarkowski
 
PPTX
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
All Things Open
 
PPTX
CouchDB Day NYC 2017: MapReduce Views
IBM Cloud Data Services
 
PPTX
Admins: Smoke Test Your Hadoop Cluster!
Michael Arnold
 
PDF
Manage and Deploy your sites with Drush
Amazee Labs
 
PDF
Spring boot - Getting Started
David Schmitz
 
PPTX
Splunk HTTP Event Collector
Splunk
 
PPT
Learn REST API with Python
Larry Cai
 
DevSec Defense
Daniel Bohannon
 
Malicious Payloads vs Deep Visibility: A PowerShell Story
Daniel Bohannon
 
How WebHooks Will Make Us All Programmers
Jeff Lindsay
 
Building Twitter's SDKs for Android
Andy Piper
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Andy McKay
 
APIs That Make Things Happen
Jeff Lindsay
 
Extending spring
Joshua Long
 
CouchDB Day NYC 2017: Mango
IBM Cloud Data Services
 
Asynchronous WordPress
Aaron Brazell
 
Asynchronous WordPress
Aaron Brazell
 
Pydata-Python tools for webscraping
Jose Manuel Ortega Candel
 
Beating Python's GIL to Max Out Your CPUs
Andrew Montalenti
 
Brisbane DevOps Meetup - Logstash
pczarkowski
 
How to Use Cryptography Properly: Common Mistakes People Make When Using Cry...
All Things Open
 
CouchDB Day NYC 2017: MapReduce Views
IBM Cloud Data Services
 
Admins: Smoke Test Your Hadoop Cluster!
Michael Arnold
 
Manage and Deploy your sites with Drush
Amazee Labs
 
Spring boot - Getting Started
David Schmitz
 
Splunk HTTP Event Collector
Splunk
 
Learn REST API with Python
Larry Cai
 

Similar to Building Event-Based Systems for the Real-Time Web (20)

PDF
Module: Mutable Content in IPFS
Ioannis Psaras
 
PDF
Анализ телеметрии при масштабировании, Theo Schlossnagle (Circonus)
Ontico
 
PDF
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
NETWAYS
 
PDF
Redis: REmote DIctionary Server
Ezra Zygmuntowicz
 
PDF
Anton Moldovan "Building an efficient replication system for thousands of ter...
Fwdays
 
KEY
Scaling Twitter with Cassandra
Ryan King
 
PDF
Grokking #9: Building a real-time and offline editing service with Couchbase
Oliver N
 
PDF
Event Driven-Architecture from a Scalability perspective
Jonas Bonér
 
PDF
Information sharing pipeline
Violeta Ilik
 
KEY
Event Driven Architecture
andreaskallberg
 
PDF
Grokking TechTalk 9 - Building a realtime & offline editing service from scra...
Grokking VN
 
PDF
Reactive Programming Models for IoT
Todd Montgomery
 
KEY
Dropping ACID - Building Scalable Systems That Work
Chris Patterson
 
KEY
Messaging, interoperability and log aggregation - a new framework
Tomas Doran
 
PDF
Turning the web stack upside down rethinking how data flows through systems
Paolo Negri
 
PDF
Tales Of The Black Knight - Keeping EverythingMe running
Dvir Volk
 
PDF
Realtime web apps rails
Ambert Ho
 
PPTX
CQRS and Event Sourcing for IoT applications
Michael Blackstock
 
PDF
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
PPTX
NoSQL Introduction, Theory, Implementations
Firat Atagun
 
Module: Mutable Content in IPFS
Ioannis Psaras
 
Анализ телеметрии при масштабировании, Theo Schlossnagle (Circonus)
Ontico
 
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
NETWAYS
 
Redis: REmote DIctionary Server
Ezra Zygmuntowicz
 
Anton Moldovan "Building an efficient replication system for thousands of ter...
Fwdays
 
Scaling Twitter with Cassandra
Ryan King
 
Grokking #9: Building a real-time and offline editing service with Couchbase
Oliver N
 
Event Driven-Architecture from a Scalability perspective
Jonas Bonér
 
Information sharing pipeline
Violeta Ilik
 
Event Driven Architecture
andreaskallberg
 
Grokking TechTalk 9 - Building a realtime & offline editing service from scra...
Grokking VN
 
Reactive Programming Models for IoT
Todd Montgomery
 
Dropping ACID - Building Scalable Systems That Work
Chris Patterson
 
Messaging, interoperability and log aggregation - a new framework
Tomas Doran
 
Turning the web stack upside down rethinking how data flows through systems
Paolo Negri
 
Tales Of The Black Knight - Keeping EverythingMe running
Dvir Volk
 
Realtime web apps rails
Ambert Ho
 
CQRS and Event Sourcing for IoT applications
Michael Blackstock
 
Server-Sent Events (real-time HTTP push for HTML5 browsers)
yay w00t
 
NoSQL Introduction, Theory, Implementations
Firat Atagun
 
Ad

More from pauldix (7)

PPTX
An introduction to reinforcement learning (rl)
pauldix
 
PDF
Terascale Learning
pauldix
 
KEY
Indexing thousands of writes per second with redis
pauldix
 
KEY
Building Web Service Clients with ActiveModel
pauldix
 
KEY
Building Web Service Clients with ActiveModel
pauldix
 
KEY
Synchronous Reads Asynchronous Writes RubyConf 2009
pauldix
 
PDF
Machine Learning Techniques for the Semantic Web
pauldix
 
An introduction to reinforcement learning (rl)
pauldix
 
Terascale Learning
pauldix
 
Indexing thousands of writes per second with redis
pauldix
 
Building Web Service Clients with ActiveModel
pauldix
 
Building Web Service Clients with ActiveModel
pauldix
 
Synchronous Reads Asynchronous Writes RubyConf 2009
pauldix
 
Machine Learning Techniques for the Semantic Web
pauldix
 
Ad

Recently uploaded (20)

PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Biography of Daniel Podor.pdf
Daniel Podor
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 

Building Event-Based Systems for the Real-Time Web