Running Pubsubhubbub on Ubuntu 10.04, Python 2.6

I was playing around with PubSubHubub and I noticed that the getting started tutorial at http://code.google.com/p/pubsubhubbub/wiki/DeveloperGettingStartedGuide is not working exactly as it should be. This was confirmed here http://groups.google.com/group/pubsubhubbub/browse_thread/thread/c2c3da5725aa6f0 and here http://groups.google.com/group/pubsubhubbub/browse_thread/thread/703ca2e0f417bc22

I played around with the instructions and changed a few steps... and it worked.

Here's what you should do to run PubSubHubBub example on Ubuntu 1004 ( Desktop version ) and Python 2.6

Step 1: Create a directory to hold all related files for this example

In my case, I've cd to Desktop and mkdir pshb. Once done, cd into pshb/

Step 2: Installing and getting the required files

You will need to install:

  • Subversion Client ( sudo aptitude install subversion )
  • Git Client ( sudo aptitude install git-core )
  • Google App Egine Python client ( wget http://googleappengine.googlecode.com/files/google_appengine_1.4.1.zip )
  • Latest version of PubSubHubBub ( svn checkout http://pubsubhubbub.googlecode.com/svn/trunk/ pubsubhubbub )
  • Example for PubSubHubBub (  git clone git://github.com/marianoguerra/tubes.git )
  • Unzip Google APp Engine Python client by running unzip google_appengine_1.4.1.zip

    Step 3: Start PubSubHubBub

    Start PubSubHubBub by running python google_appengine/dev_appserver.py pubsubhubbub/hub

    Now go to http://localhost:8080

    Step 4: Running the example

    FIrst, cd  to tubes/ihasfriendz

    Next run this command : python main.py

    Now navigate to http://localhost:8081/files/index.html

    Step 5: Creating entries at http://localhost:8081/files/index.html

    Now you can start to create entries using any username, title and content

    In my case, i'll use "eugene" as the username

    * the username is required as it is part of the publish/subscribe url which we will be seeing later

    Step 6: Publish your feed

    Navigate to http://localhost:8080/publish

    Assuming you have created entries using the username "eugene" , enter http://localhost:8081/atom/stream/eugene in the feed url field.

    Click "Publish". If nothing happens, everything is moving smoothly.

    Step 7: Subscribe to feed.

    Now that you have published your feed, you can subscribe it by first navigating to http://localhost:8080/subscribe and than entering http://localhost:8081/atom/stream/eugene for the feed url and http://localhost:8081/callback for the callback url.

    Do not enter anything for "verify token" and  HMAC secret. Entering any values for these two fields somehow screws up the example; GAE will not do any pushing or pulling of events.

    Step 8: Checking for new updates

    Navigate to http://localhost:8081/new-notices/ and open up a new browser window and naviagate to http://localhost:8081/files/index.html

    Begin entering 1 or 2 new posts at http://localhost:8081/files/index.html. Than refresh http://localhost:8081/new-notices/. You should see the new posts which you have just created.

    If you refresh http://localhost:8081/new-notices/ again, you will not see any new notices since it only updates new posts.

    Differences as compared to the original tutorial

    1. No need to visit the GAE admin
    2. We are using Python 2.6 instead of 2.5
    3. We are using GAE python client 1.4.1 instead of 1.3.5
    4. The order of the steps are slightly changed.

    Hopefully the above tutorial helps!