-
Notifications
You must be signed in to change notification settings - Fork 1
pubsubhubbub hub example
This page based on the following blog post. First, you have to start the server in a new terminal window, because it will output a lot over the time you may are interested in:
cd /path/to/ow/extensions/pubsub/pubsubserver
sh start_hub_server.sh
You will some outputs and something like this:
INFO 2013-01-18 11:05:07,007 dev_appserver_multiprocess.py:655] Running application dev~pubsubhubbub on port 8080: http://localhost:8080
INFO 2013-01-18 11:05:07,007 dev_appserver_multiprocess.py:657] Admin console is available at: http://localhost:8080/_ah/admin
Now you have to start the example:
cd /path/to/ow/extensions/pubsub/pubsubserver
sh start_hub_server_example.sh
Please browse to http://localhost:8080/, did you see something like this?
Welcome to the PubSubHubbub reference Hub server!
PubSubHubbub is a simple, open, web-hook-based pubsub (publish/subscribe) protocol.
[...]
Yes? Great. Now please browse to http://localhost:8081/, did you see a page with a blue formular? Yes? Great, than everything works fine :)
Go to http://localhost:8081/files/index.html
Create entries with username for example konrad.
Go to http://localhost:8080/publish
Enter http://localhost:8081/atom/stream/konrad
in the feed url field.
Click Publish
Go to http://localhost:8080/subscribe
Entering http://localhost:8081/atom/stream/konrad
for the feed url and http://localhost:8081/callback
for the callback url.
Click Do it
Go to http://localhost:8081/new-notices/
You should see your previously created entries.
If you refresh http://localhost:8081/new-notices/ you will not see any new notices since it only updates new posts.
It occurs because there is a package for establishing a db connection missing. For installing it under your Debian / Ubuntu execute this in your terminal:
sudo apt-get install python-mysqldb