SlideShare a Scribd company logo
Realtime with PuSH and Feeds

                            Alex Barth
                                              25. aug 9:00
                                              Acquia


Tuesday, August 24, 2010
Development Seed

                           Managing News



Tuesday, August 24, 2010
Are we there yet?

                                http://www.flickr.com/photos/geraldbrazell/4562022876/
Tuesday, August 24, 2010
Are we there yet?
                                     Are we there yet?
                                     Are we there yet?
                                     Are we there yet?
                                     Are we there yet?
                           rss.xml

          Publisher                                  Subscriber



        Yes. Here you are.


                                     Are we there yet?

Tuesday, August 24, 2010
Ask developmentseed.org every
            30 minutes
for a new blog post, you’ll download
               11 MB
              for about
                  9K
         blog posts a week.

Tuesday, August 24, 2010
Do that for
                            100 similar blogs
                           and you’ll download
                           1G of data a week
                             just for polling.


Tuesday, August 24, 2010
What’s worse:




           Polling many feeds will back up.

                           http://www.flickr.com/photos/geraldbrazell/4562022876/
Tuesday, August 24, 2010
Publish and Subscribe




                                  http://www.flickr.com/photos/geraldbrazell/4562022876/
Tuesday, August 24, 2010
Notification

          Publisher                      Subscriber




Tuesday, August 24, 2010
PubSubHubbub
                        is a
           Publish and Subscribe standard



Tuesday, August 24, 2010
It solves two problems




Tuesday, August 24, 2010
Problem 1: Tons of notifications   Subscriber
                                  Subscriber
                                  Subscriber
                                  Subscriber
                                  Subscriber
      Publisher
                                  Subscriber
                                  Subscriber
                                  Subscriber
                                  Subscriber

Tuesday, August 24, 2010
                                  Subscriber
Problem 1: Tons of notifications   Subscriber
Solution: Use a Hub               Subscriber
                                  Subscriber
                                  Subscriber
                                  Subscriber
      Publisher            Hub
                                  Subscriber
                                  Subscriber
                                  Subscriber
                                  Subscriber

Tuesday, August 24, 2010
                                  Subscriber
Problem 2: The thundering herd   Subscriber
                                 Subscriber
                                 Subscriber
                                 Subscriber
                                 Subscriber
      Publisher
                                 Subscriber
                                 Subscriber
                                 Subscriber
                                 Subscriber

Tuesday, August 24, 2010
                                 Subscriber
Problem 2: The thundering herd
Solution: Send what’s changed (fat ping).




         Hub                                Subscriber

                              nges
                           Cha


Tuesday, August 24, 2010
And what about RSS Cloud?




Tuesday, August 24, 2010
PubSubHubbub is a specification




Tuesday, August 24, 2010
It’s all HTTP and XML.




Tuesday, August 24, 2010
Tuesday, August 24, 2010
1. Subscriber POSTs subscription request to the Hub. The
    request contains the endpoint URL where the Hub should
    POST new updates.
                           I want to subscribe to
                           feed X, send updates
                                to this URL:



      Publisher            Hub                      Subscriber




                               From http://code.google.com/p/pubsubhubbub/
Tuesday, August 24, 2010
2. Hub POSTs to the endpoint URL to verify the request was
    authentic; Subscriber responds with confirmation to the Hub.

                               Hey there! Did
                             you really send this
                                  request?



      Publisher             Hub                      Subscriber


                                Yup, that was really
                                  me, not a DoS
                                     attacker.
                                From http://code.google.com/p/pubsubhubbub/
Tuesday, August 24, 2010
3. Publisher notifies Hub about updates by POSTing feed URLs
    to the Hub; Hub pulls the feed again to find new entries.


                           I have new content
                            for feed X for you!



      Publisher                               Hub                       Subscriber


                                                  Give me your latest
                      Here you go.                content for feed X,
                                                       please.
                                                   From http://code.google.com/p/pubsubhubbub/
Tuesday, August 24, 2010
4. When Hub receives new update to feed X, it POSTs the
    update to the Subscriber’s endpoint URL.

                               New update to
                            feed X - here you go:




      Publisher             Hub                     Subscriber




                               From http://code.google.com/p/pubsubhubbub/
Tuesday, August 24, 2010
5. If feed X has multiple subscribers, the Hub sends updates to
    all of them. This reduces load on the Publisher.

                                New update to
                             feed X - here you go:


                                                       Subscriber
      Publisher              Hub                       Subscriber
                                                       Subscriber
                                                       Subscriber
                                                       Subscriber

Tuesday, August 24, 2010
                                                       Subscriber
                                 From http://code.google.com/p/pubsubhubbub/
Questions?




Tuesday, August 24, 2010
Who supports it?




Tuesday, August 24, 2010
Wordpress




Tuesday, August 24, 2010
Feedburner




Tuesday, August 24, 2010
Blogger (Google, right?)




Tuesday, August 24, 2010
Reference Hub




Tuesday, August 24, 2010
Hub: Superfeedr




Tuesday, August 24, 2010
Drupal as subscriber: Feeds




Tuesday, August 24, 2010
Drupal as publisher: 404




Tuesday, August 24, 2010
Check out Views content cache




Tuesday, August 24, 2010
Drupal as hub: PuSH Hub
                                (onboard hub)




Tuesday, August 24, 2010
Demo time




Tuesday, August 24, 2010
function pusher_menu() {
        $items = array();
        $items['realtime.xml'] = array(
           'title' => 'Realtime RSS feed',
           'page callback' => 'pusher_feed_page',
           'access arguments' => array('access content'),
           'type' => MENU_CALLBACK,
        );
        return $items;
      }

      function pusher_feed_page() {
        drupal_set_header(
          'Content-Type: application/rss+xml; charset=utf-8');
        print pusher_feed();
      }




Tuesday, August 24, 2010
function pusher_nodeapi($node, $op) {
        if ($op == 'insert' || $op == 'update') {
          if ($node->status && $node->promote) {
            pusher_notify($node->nid);
          }
        }
      }

      function pusher_notify($nid) {
        node_load(NULL, NULL, TRUE);
        $changed = pusher_feed(array($nid));
        push_hub_notify(url('realtime.xml',
          array('absolute' => TRUE)), $changed, TRUE);
      }




Tuesday, August 24, 2010
David Weinberger:


                           “Small pieces loosely joined”




Tuesday, August 24, 2010
PuSHing users




Tuesday, August 24, 2010
Mapping content between sites




Tuesday, August 24, 2010
Check out


       • PubSubHubbub spec
       • Feeds module (PuSHSubscriber.inc)
       • PuSH Hub module (PuSHHub.inc)



Tuesday, August 24, 2010
What’s next?
       • Solidify Subscriber support
       • Implement Publisher support
       • Solidify content mapping
         standards
       • Security: PuSH + OAuth
       • Content type independence

Tuesday, August 24, 2010
Thank you.

                           Questions?



Tuesday, August 24, 2010
http://cph2010.drupal.org/node/15363




Tuesday, August 24, 2010

More Related Content

More from Development Seed

Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019
Development Seed
 
GeoDC: Better data for better elections in Afghanistan
GeoDC: Better data for better elections in AfghanistanGeoDC: Better data for better elections in Afghanistan
GeoDC: Better data for better elections in Afghanistan
Development Seed
 
Cartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMapCartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMap
Development Seed
 
Nonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC MeetupNonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC Meetup
Development Seed
 
Famine Mapping with USAID
Famine Mapping with USAIDFamine Mapping with USAID
Famine Mapping with USAID
Development Seed
 
Tilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit MapsTilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit Maps
Development Seed
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011
Development Seed
 
Alternative Mapping on iOS
Alternative Mapping on iOSAlternative Mapping on iOS
Alternative Mapping on iOS
Development Seed
 
Transparency camp
Transparency campTransparency camp
Transparency camp
Development Seed
 
Fast Map Interaction without Flash
Fast Map Interaction without FlashFast Map Interaction without Flash
Fast Map Interaction without Flash
Development Seed
 
Tech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillTech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMill
Development Seed
 
ReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build Plan
Development Seed
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
Development Seed
 
Offline Mapping: International Crisis
Offline Mapping: International CrisisOffline Mapping: International Crisis
Offline Mapping: International Crisis
Development Seed
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them all
Development Seed
 
Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2
Development Seed
 
For every site a make file
For every site a make fileFor every site a make file
For every site a make file
Development Seed
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:
Development Seed
 
Open Atrium
Open Atrium Open Atrium
Open Atrium
Development Seed
 
Opening Large Data Sets
Opening Large Data SetsOpening Large Data Sets
Opening Large Data Sets
Development Seed
 

More from Development Seed (20)

Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019Rasters are not Monsters - GeoMTL 2019
Rasters are not Monsters - GeoMTL 2019
 
GeoDC: Better data for better elections in Afghanistan
GeoDC: Better data for better elections in AfghanistanGeoDC: Better data for better elections in Afghanistan
GeoDC: Better data for better elections in Afghanistan
 
Cartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMapCartography with TileMill, PostGIS, and OpenStreetMap
Cartography with TileMill, PostGIS, and OpenStreetMap
 
Nonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC MeetupNonprofit Mapping at Net2DC Meetup
Nonprofit Mapping at Net2DC Meetup
 
Famine Mapping with USAID
Famine Mapping with USAIDFamine Mapping with USAID
Famine Mapping with USAID
 
Tilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit MapsTilemill: Making Custom Transit Maps
Tilemill: Making Custom Transit Maps
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011
 
Alternative Mapping on iOS
Alternative Mapping on iOSAlternative Mapping on iOS
Alternative Mapping on iOS
 
Transparency camp
Transparency campTransparency camp
Transparency camp
 
Fast Map Interaction without Flash
Fast Map Interaction without FlashFast Map Interaction without Flash
Fast Map Interaction without Flash
 
Tech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMillTech@State Preview of Designing Custom Maps with TileMill
Tech@State Preview of Designing Custom Maps with TileMill
 
ReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build PlanReliefWeb Drupal 7 Build Plan
ReliefWeb Drupal 7 Build Plan
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
 
Offline Mapping: International Crisis
Offline Mapping: International CrisisOffline Mapping: International Crisis
Offline Mapping: International Crisis
 
Aegir one drupal to rule them all
Aegir one drupal to rule them allAegir one drupal to rule them all
Aegir one drupal to rule them all
 
Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2Backstage with Drupal localization- Part 2
Backstage with Drupal localization- Part 2
 
For every site a make file
For every site a make fileFor every site a make file
For every site a make file
 
Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:Drupal Distributions: The Dos and Don'ts:
Drupal Distributions: The Dos and Don'ts:
 
Open Atrium
Open Atrium Open Atrium
Open Atrium
 
Opening Large Data Sets
Opening Large Data SetsOpening Large Data Sets
Opening Large Data Sets
 

Recently uploaded

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 

Recently uploaded (20)

20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 

Go real time with pubsubhubbub and feeds

  • 1. Realtime with PuSH and Feeds Alex Barth 25. aug 9:00 Acquia Tuesday, August 24, 2010
  • 2. Development Seed Managing News Tuesday, August 24, 2010
  • 3. Are we there yet? http://www.flickr.com/photos/geraldbrazell/4562022876/ Tuesday, August 24, 2010
  • 4. Are we there yet? Are we there yet? Are we there yet? Are we there yet? Are we there yet? rss.xml Publisher Subscriber Yes. Here you are. Are we there yet? Tuesday, August 24, 2010
  • 5. Ask developmentseed.org every 30 minutes for a new blog post, you’ll download 11 MB for about 9K blog posts a week. Tuesday, August 24, 2010
  • 6. Do that for 100 similar blogs and you’ll download 1G of data a week just for polling. Tuesday, August 24, 2010
  • 7. What’s worse: Polling many feeds will back up. http://www.flickr.com/photos/geraldbrazell/4562022876/ Tuesday, August 24, 2010
  • 8. Publish and Subscribe http://www.flickr.com/photos/geraldbrazell/4562022876/ Tuesday, August 24, 2010
  • 9. Notification Publisher Subscriber Tuesday, August 24, 2010
  • 10. PubSubHubbub is a Publish and Subscribe standard Tuesday, August 24, 2010
  • 11. It solves two problems Tuesday, August 24, 2010
  • 12. Problem 1: Tons of notifications Subscriber Subscriber Subscriber Subscriber Subscriber Publisher Subscriber Subscriber Subscriber Subscriber Tuesday, August 24, 2010 Subscriber
  • 13. Problem 1: Tons of notifications Subscriber Solution: Use a Hub Subscriber Subscriber Subscriber Subscriber Publisher Hub Subscriber Subscriber Subscriber Subscriber Tuesday, August 24, 2010 Subscriber
  • 14. Problem 2: The thundering herd Subscriber Subscriber Subscriber Subscriber Subscriber Publisher Subscriber Subscriber Subscriber Subscriber Tuesday, August 24, 2010 Subscriber
  • 15. Problem 2: The thundering herd Solution: Send what’s changed (fat ping). Hub Subscriber nges Cha Tuesday, August 24, 2010
  • 16. And what about RSS Cloud? Tuesday, August 24, 2010
  • 17. PubSubHubbub is a specification Tuesday, August 24, 2010
  • 18. It’s all HTTP and XML. Tuesday, August 24, 2010
  • 20. 1. Subscriber POSTs subscription request to the Hub. The request contains the endpoint URL where the Hub should POST new updates. I want to subscribe to feed X, send updates to this URL: Publisher Hub Subscriber From http://code.google.com/p/pubsubhubbub/ Tuesday, August 24, 2010
  • 21. 2. Hub POSTs to the endpoint URL to verify the request was authentic; Subscriber responds with confirmation to the Hub. Hey there! Did you really send this request? Publisher Hub Subscriber Yup, that was really me, not a DoS attacker. From http://code.google.com/p/pubsubhubbub/ Tuesday, August 24, 2010
  • 22. 3. Publisher notifies Hub about updates by POSTing feed URLs to the Hub; Hub pulls the feed again to find new entries. I have new content for feed X for you! Publisher Hub Subscriber Give me your latest Here you go. content for feed X, please. From http://code.google.com/p/pubsubhubbub/ Tuesday, August 24, 2010
  • 23. 4. When Hub receives new update to feed X, it POSTs the update to the Subscriber’s endpoint URL. New update to feed X - here you go: Publisher Hub Subscriber From http://code.google.com/p/pubsubhubbub/ Tuesday, August 24, 2010
  • 24. 5. If feed X has multiple subscribers, the Hub sends updates to all of them. This reduces load on the Publisher. New update to feed X - here you go: Subscriber Publisher Hub Subscriber Subscriber Subscriber Subscriber Tuesday, August 24, 2010 Subscriber From http://code.google.com/p/pubsubhubbub/
  • 26. Who supports it? Tuesday, August 24, 2010
  • 32. Drupal as subscriber: Feeds Tuesday, August 24, 2010
  • 33. Drupal as publisher: 404 Tuesday, August 24, 2010
  • 34. Check out Views content cache Tuesday, August 24, 2010
  • 35. Drupal as hub: PuSH Hub (onboard hub) Tuesday, August 24, 2010
  • 37. function pusher_menu() { $items = array(); $items['realtime.xml'] = array( 'title' => 'Realtime RSS feed', 'page callback' => 'pusher_feed_page', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ); return $items; } function pusher_feed_page() { drupal_set_header( 'Content-Type: application/rss+xml; charset=utf-8'); print pusher_feed(); } Tuesday, August 24, 2010
  • 38. function pusher_nodeapi($node, $op) { if ($op == 'insert' || $op == 'update') { if ($node->status && $node->promote) { pusher_notify($node->nid); } } } function pusher_notify($nid) { node_load(NULL, NULL, TRUE); $changed = pusher_feed(array($nid)); push_hub_notify(url('realtime.xml', array('absolute' => TRUE)), $changed, TRUE); } Tuesday, August 24, 2010
  • 39. David Weinberger: “Small pieces loosely joined” Tuesday, August 24, 2010
  • 41. Mapping content between sites Tuesday, August 24, 2010
  • 42. Check out • PubSubHubbub spec • Feeds module (PuSHSubscriber.inc) • PuSH Hub module (PuSHHub.inc) Tuesday, August 24, 2010
  • 43. What’s next? • Solidify Subscriber support • Implement Publisher support • Solidify content mapping standards • Security: PuSH + OAuth • Content type independence Tuesday, August 24, 2010
  • 44. Thank you. Questions? Tuesday, August 24, 2010