naming conventions
- pshb/PSHB = pubsubhubbub
- gae/GAE = Google App Engine
- things that start with "$" are bash commands
- things that start with "!" are important notes
create directory to hold all the content of this tutorial
$ mkdir pshb
$ cd pshb
download Google App Engine SDK
$ wget http://googleappengine.googlecode.com/files/google_appengine_1.2.4.zip
$ unzip google_appengine_1.2.4.zip
download the latest version of pshb
$ svn checkout http://pubsubhubbub.googlecode.com/svn/trunk/ pubsubhubbub
start pshb
$ python2.5 google_appengine/dev_appserver.py pubsubhubbub/hub/
check that the hub started
type http://localhost:8080 on your browser, you should see something like:
Welcome to the demo PubSubHubbub reference Hub server!
download the example
# we will need to fetch the tubes library and the example that we will be using.
$ git clone git://github.com/marianoguerra/tubes.git
# now we will start the example
$ cd tubes/ihasfriendz/
$ python main.py
* Running on http://0.0.0.0:8081/
* Restarting with reloader...
components used by the example
- werkzeug: http://werkzeug.pocoo.org
- jquery: http://jquery.com
- tubes: http://github.com/marianoguerra/tubes/tree/master
- pubsubhubbub_publish.py: from pshb
- feedformatter.py: http://code.google.com/p/feedformatter/
publish the feed to the hub
go to the following URL on your browser: http://localhost:8080/publish
on the Topic field enter: http://localhost:8081/atom/stream/_MYUSER_ and click publish
subscribing to the hub
go to the following URL on your browser: http://localhost:8080/subscribe
create some content
go to the following URL on your browser: http://localhost:8081/files/index.html
post some content on the form, use the user you used as MYUSER
you can check that the item was posted going manually to http://localhost:8081/atom/stream/_MYUSER_, you should see an atom feed there
manually processing the tasks
click on the feed-pulls link, there click on the run button.
when we run the feed pulls task, we tell pshb to fetch the feeds that have new content (the ones that did a post to the hub to inform that there is new content)
! on production hubs this tasks are done automatically
now we go again to the Task Queues page, there the event-delivery queue should have a number different than 0 (the number of messages that are pending to be sent to the subscribers), we click on the event-delivery and then we click on the run button.
seeing it work
for lazy people
#!/usr/bin/env sh
# create the example directory
mkdir pshb
cd pshb
CWD=$(pwd)
EXAMPLE=$CWD/tubes/ihasfriendz
wget http://googleappengine.googlecode.com/files/google_appengine_1.2.4.zip
unzip google_appengine_1.2.4.zip
svn checkout http://pubsubhubbub.googlecode.com/svn/trunk/ pubsubhubbub
# we will need to fetch the tubes library and the example that we will be using.
git clone git://github.com/marianoguerra/tubes.git
# now we will start the example
echo "run \"cd $EXAMPLE; python main.py\" on a shell to run the example"
echo "run \"cd $PWD; python2.5 google_appengine/dev_appserver.py pubsubhubbub/hub/\" on a shell to run the hub"
1 comentario:
[url=http://www.playlist.com/blog/entry/12485459459]cheap cialis[/url]
[url=http://www.playlist.com/blog/entry/12485461507]cheap cipro[/url]
[url=http://www.playlist.com/blog/entry/12485463555]cheap cleocin[/url]
[url=http://www.playlist.com/blog/entry/12485464579]cheap deltasone[/url]
[url=http://www.playlist.com/blog/entry/12485464835]cheap indocin[/url]
[url=http://www.playlist.com/blog/entry/12485465091]cheap lasix[/url]
[url=http://www.playlist.com/blog/entry/12485465347]cheap levitra[/url]
[url=http://www.playlist.com/blog/entry/12485465603]cheap mobic[/url]
[url=http://www.playlist.com/blog/entry/12485465859]cheap nolvadex[/url]
[url=http://www.playlist.com/blog/entry/12485466115]cheap propecia[/url]
[url=http://www.playlist.com/blog/entry/12485466371]cheap sumycin[/url]
[url=http://www.playlist.com/blog/entry/12485466627]cheap synthroid[/url]
[url=http://www.playlist.com/blog/entry/12485466883]cheap viagra[/url]
[url=http://www.playlist.com/blog/entry/12485467139]cheap zithromax[/url]
[url=http://www.playlist.com/blog/entry/12485467395]proscar side effects[/url]
[url=http://www.playlist.com/blog/entry/12485467651]tamiflu avian flu[/url]
[url=http://www.playlist.com/blog/entry/12485468163]drug doxycycline[/url]
[url=http://www.playlist.com/blog/entry/12485468419]diflucan yeast infection[/url]
[url=http://www.playlist.com/blog/entry/12485468675]cheap topamax[/url]
[url=http://www.playlist.com/blog/entry/12485468931]cheap albuterol[/url]
[url=http://www.playlist.com/blog/entry/12485469443]buy albuterol online[/url]
[url=http://www.playlist.com/blog/entry/12485470211]drug cialis[/url]
[url=http://www.playlist.com/blog/entry/12485470979]buy cipro[/url]
[url=http://www.playlist.com/blog/entry/12485471491]buy cleocin[/url]
[url=http://www.playlist.com/blog/entry/12485472259]buy deltasone[/url]
[url=http://www.playlist.com/blog/entry/12485472771]buy indocin[/url]
[url=http://www.playlist.com/blog/entry/12485473539]buy lasix[/url]
[url=http://www.playlist.com/blog/entry/12485474051]buy levitra[/url]
[url=http://www.playlist.com/blog/entry/12485475075]buy mobic[/url]
[url=http://www.playlist.com/blog/entry/12485476099]clomid nolvadex[/url]
[url=http://www.playlist.com/blog/entry/12485477891]buy propecia[/url]
[url=http://www.playlist.com/blog/entry/12485479171]buy sumycin[/url]
[url=http://www.playlist.com/blog/entry/12485481219]buy synthroid[/url]
[url=http://www.playlist.com/blog/entry/12485483779]buy viagra[/url]
[url=http://www.playlist.com/blog/entry/12485485571]zithromax z-pak[/url]
[url=http://www.playlist.com/blog/entry/12485488643]buy proscar[/url]
[url=http://www.playlist.com/blog/entry/12485491715]buy tamiflu[/url]
[url=http://www.playlist.com/blog/entry/12485495555]buy doxycycline[/url]
[url=http://www.playlist.com/blog/entry/12485499395]diflucan candida[/url]
[url=http://www.playlist.com/blog/entry/12485503235]buy topamax[/url]
Publicar un comentario