Zend_Feed_Pubsubhubbub-Introduction.xml 5.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.feed.pubsubhubbub.introduction">
  4. <title>Introduction</title>
  5. <para>
  6. <classname>Zend_Feed_Pubsubhubbub</classname> is an implementation of the PubSubHubbub Core
  7. 0.2 Specification (Working Draft). It offers implementations of a Pubsubhubbub Publisher and
  8. Subscriber suited to Zend Framework and other PHP applications.
  9. </para>
  10. <sect2>
  11. <title>What is Pubsubhubbub?</title>
  12. <para>
  13. Pubsubhubbub is an open, simple web-scale pubsub protocol. A common use case to enable
  14. blogs (Publishers) to "push" updates from their RSS or Atom feeds (Topics) to end
  15. Subscribers. These Subscribers will have subscribed to the blog's RSS or Atom feed via a
  16. Hub, a central server which is notified of any updates by the Publisher and which then
  17. distributes these updates to all Subscribers. Any feed may advertise that it supports
  18. one or more Hubs using an Atom namespaced link element with a rel attribute of "hub".
  19. </para>
  20. <para>
  21. Pubsubhubbub has garnered attention because it is a pubsub protocol which is easy to
  22. implement and which operates over HTTP. Its philosophy is to replace the traditional
  23. model where blog feeds have been polled at regular intervals to detect and retrieve
  24. updates. Depending on the frequency of polling, this can take a lot of time to
  25. propagate updates to interested parties from planet aggregators to desktop readers. With
  26. a pubsub system in place, updates are not simply polled by Subscribers, they are pushed to
  27. Subscribers, elimenating any delay. For this reason, Pubsubhubbub forms part of what has
  28. been dubbed the real-time web.
  29. </para>
  30. <para>
  31. The protocol does not exist in isolation. Pubsub systems have been around for a while,
  32. such as the familiar Jabber Publish-Subscribe protocol, XEP-0060, or the less well known
  33. rssCloud (described in 2001). However these have not achieved widespread adoption typically
  34. due to either their complexity, poor timing or lack of suitability for web applications.
  35. rssCloud, which was recently revived as a response to the appearance of Pubsubhubbub, has
  36. also seen its usage increase significantly though it lacks a formal specification and
  37. currently does not support Atom 1.0 feeds.
  38. </para>
  39. <para>
  40. Perhaps surprisingly given its relative early age, Pubsubhubbub is already in use including
  41. in Google Reader, Feedburner, and there are plugins available for Wordpress blogs.
  42. </para>
  43. </sect2>
  44. <sect2>
  45. <title>Zend_Feed_Pubsubhubbub</title>
  46. <para>
  47. <classname>Zend_Feed_Pubsubhubbub</classname> implements two sides of the Pubsubhubbub
  48. 0.2 Specification: a Publisher and a Subscriber. It does not currently implement a Hub
  49. Server though this is in progress for a future Zend Framework release.
  50. </para>
  51. <para>
  52. A Publisher is responsible for notifying all supported Hubs (many can be supported to
  53. add redundancy to the system) of any updates to its feeds, whether they be Atom or RSS
  54. based. This is achieved by pinging the supported Hub Servers with the URL of the updated
  55. feed. In Pubsubhubbub terminology, any updatable resource capable of being subscribed
  56. to is referred to as a Topic. Once a ping is received, the Hub will request the updated
  57. feed, process it for updated items, and forward all updates to all Subscribers
  58. subscribed to that feed.
  59. </para>
  60. <para>
  61. A Subscriber is any party or application which subscribes to one or more Hubs to receive
  62. updates from a Topic hosted by a Publisher. The Subscriber never directly communicates
  63. with the Publisher since the Hub acts as an intermediary, accepting subscriptions and
  64. sending updates to subscribed Subscribers. The Subscriber therefore communicates only
  65. with the Hub, either to subscribe/unsubscribe to Topics, or when it receives updates
  66. from the Hub. This communication design ("Fat Pings") effectively removes the possibility of
  67. a "Thundering Herd" issue. This occurs in a pubsub system where the Hub merely informs
  68. Subscribers that an update is available, prompting all Subscribers to immediately retrieve
  69. the feed from the Publisher giving rise to a traffic spike. In Pubsubhubbub, the Hub
  70. distributes the actual update in a "Fat Ping" so the Publisher is not subjected to any
  71. traffic spike.
  72. </para>
  73. <para>
  74. <classname>Zend_Feed_Pubsubhubbub</classname> implements Pubsubhubbub Publishers and
  75. Subscribers with the
  76. classes <classname>Zend_Feed_Pubsubhubbub_Publisher</classname> and
  77. <classname>Zend_Feed_Pubsubhubbub_Subscriber</classname>. In addition, the Subscriber
  78. implementation may handle any feed updates forwarded from a Hub by using
  79. <classname>Zend_Feed_Pubsubhubbub_Subscriber_Callback</classname>. These classes, their
  80. use cases, and APIs are covered in subsequent sections.
  81. </para>
  82. </sect2>
  83. </sect1>