This document discusses using the Feeds module in Drupal to import content into a site in real-time using PubSubHubbub. It explains that Feeds allows importing content from various sources into nodes, users, taxonomy, etc. but typically involves periodic cron jobs. PubSubHubbub allows setting up a publish/subscribe system so that when content is published by a source, like new check-ins on Gowalla, Drupal is notified immediately instead of waiting for a cron job. It demonstrates importing geotagged Flickr photos and seeing real-time Gowalla check-ins on a map as they are published.
2. Overview
• What is Feeds module all about?
• How does Feeds module work?
• DEMO: Importing Flickr photos
• Real-time feeds with PubSubHubbub
• Very Exciting Demonstration with Gowalla!
3. What is Feeds Module?
• Import and aggregation framework
• Creates nodes, users, taxonomy, flat data...
• From RSS / Atom / SOAP / CSV / ...
• Mapping of input to Drupal elements
• It’s easily extensible and supports
PubSubHubbub as a subscriber
4. But, what about...
Periodic One-off
Imports Imports
Aggregator Migrate
Feed API Node Import
User Import
6. How does Feeds work?
Fetcher Parser Processor
HTTP RSS NODE
HTTPS ATOM USER
FILE FLICKR TAXONOMY
... ... ...
7. How does it work?
Feeds Importer
{
Fetcher
HTTP
HTTPS
FILE
...
Parser
RSS
ATOM
FLICKR
...
Processor
NODE
USER
TAXONOMY
...
8. Let’s import some stuff
Feeds Importer
{
Fetcher
HTTP
HTTPS
FILE
...
Parser
RSS
ATOM
FLICKR
...
Processor
NODE
USER
TAXONOMY
...
9. DEMO
• Importing photos from Flickr into Drupal
nodes
• Using location data from GeoRSS feed to
display them on a Google map
• Import set to run on cron every 30 mins.
10. What’s wrong with that?
Are we there yet?
Are we there yet?
Publisher Subscriber
Yes! Here you are.
Are we there yet?
15. Step 1 of 2: Subscribe
I want to subscribe to
feed X, send updates
to me.
Publisher Hub Subscriber
Are you for real?
16. Step 2 of 2: Publish
Hey subscribers,
here’s new content for
I have new content feed X
for feed X
Subscriber
Subscriber
Publisher Hub
Subscriber
Subscriber
17. Let’s import some more
stuff...
• Now in real-time with PuSH
• Check into Gowalla from mobile phone
• See location update on Google map in
Drupal
19. Step 1 of 2: Subscribe
• When we created the Gowalla Feed node,
we asked the hub to send us updates.
I want to subscribe to
John’s Gowalla Feed
Super
Publisher
Gowalla Drupal Site
Feedr
20. Step 2 of 2: Publish
• No polling
• No cron runs
• Real-time update
Super
Publisher
Gowalla Drupal Site
Feedr
23. References
Feeds Module - http://drupal.org/project/feeds
Flickr Parser - http://drupal.org/project/feeds_flickr
Pubsubhubbub spec - http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-
core-0.3.html
Superfeedr - http://superfeedr.com/
Federated Social Web Google Group - http://groups.google.com/group/federated-social-
web
24. Credits
• PubSubHubbub diagrams inspired by Alex
Barth’s presentation at Drupalcon CPH.
• Walled social network image - David
Simonds (The Economist)