[Updated 2] Atom-PubSub module for ejabberd
Eric Cestari - cstar - June 19, 2008As requested, the Atom PubSub bridge
This module offersr an AtomPub interface to ejabberd PubSub data. Currently in two unfinished flavors, one for use with yaws embedded. One for use with ejabberd_http server
Howto
You need to have Yaws available. It will start in embedded mode, with the mod_yaws module (included).
To build, edit the Makefile to match your erlang install and make Put the resulting beams in some place where ejabberd will find them.
Also youâll need to set the BASEURL macro in atom_pubsub.erl to your webserver hostname.
Youâll also need to add the module to your ejabberd.cfg in the mmodules section:
{mod_yaws,[{logdir, "/tmp/"}, {servers, [ {"localhost", 5224, "/opt/var/yaws/www", [ {dir_listing, true}, {appmods, {"/atom", atom_pubsub}} ]} ]} ]}
What you get
The AtomPub interface passes the Atom Protocol Exerciser (though some warnings remain).
It means that any AtomPub clients will be able to post to a specific node in your PubSub tree.
It also means that your PubSub tree will also be available as an AtomFeed.
Of course, each time an item is posted through AtomPub or PubSub on a node you are subscribed to, youâll get the notification.
Can I have it with OpenFire and Epeios ?
Thatâs not possible. At some point, thereâs no way around hitting directly the PubSub mnesia tables. So you canât extract the code as a component.
Moreover, it only works with PubSub nodes derived from the default node type. (because of the mnesia tables stuff)
Whatâs next ?
Iâll update the code soon. A few of things Iâd like to implement :
- remove all calls to mnesia and work through mod_pubsub API.
- add HEAD, etag and slug support (thatâs a patch for ejabberd though)
- remove that baseurl horrible macro
- add node subscription through REST
- as soon as ejabberd 2.1 is published remove dependency from yaws
- add binary collections support
Mickaël Rémond from Process-One kindly offered to host atom-pubsub on the ejabberd_modules svn.
svn co https://svn.process-one.net/ejabberd-modules/atom_pubsub/trunk/
Thereâs a quick port to the ejabberd_http server at this location : You need to be running ejabberd 2.1 or current trunk to have it work.
svn co https://svn.process-one.net/ejabberd-modules/atom_pubsub/branches/ejabberd_http_branch/
Check out the README for installation.
Shoot your questions in the comment or via email (anything on this weblog domain goes to my inbox)
Categories: Blogs Eric Cestari
Comments
No comments so far, you could be the first.Add comment
Erlang on Twitter
» ingojaeckel (ingo jaeckel): Even more awesome, free Erlang resources http://t.co/blGINLJd
» DiTeam (Тимурка): @multybuq @ukhin руби хороший вариант :) можно даже без rails..попробуй erlang еще :)
» michelir5 (Micheli Gelatinous): @pharkmillups Still seeing it. I might just have to manually install it. The version of Erlang required by Riak is not current version in HB
» Angry_Lawyer (Tony Aldridge): @rvirding @saghul If Erlang kills you, does a supervisor automatically create a replacement of you?
» rvirding (Robert Virding): Softly I hope. RT @saghul: Slowly making progress… erlang is killing me.
» jsvd (João Duarte): RT @FrancescoC: Woot! RT @valdo404: Practical Erlang Programming at #QConLondon I want to go there
» saghul (Saúl Ibarra Corretgé): Slowly making progress… erlang is killing me.
» dlsspy (Dustin Sallings): @IbnFirnas heh. The erlang parts are still solid. The currently active alerting box is arm5, failed over from a pc that died one day.
» quercialwji2 (Quercia Quinn): @MikeSmooth_ABCs http://t.co/pPiIpTCx
» levicole (Levi Kennedy): @pharkmillups the homebrew version of erlang is the most recent version, and riak requires R14B I think.
Statistics
Number of aggregated posts: 10456
Number of comments: 1445
Most recent article: February 06, 2012
Latest comments
» simple smile on Scale means Skills: Very informative article. Pretty sure people would love to go to that place for shopping. Specially to those who are…
» simplesmile on 27 January 2012: Erlang Solutions embarks on an Erlang Embedded KTP: Your article will make the world better. Thanks again and good luck to you in your life. See you next time.simplesmile
» tandblekning easewhite on 08 February 2012: Erlang Express 3-day Course in San Francisco on 8 February: ncomprehensible to me now, but in general, the usefulness and significance is overwhelmingtandblekning easewhite