Moving to the PubSub Blog.

Personal Notes

I have finally put together the first iteration of the pubsub blog I am building. This entry was made using it. I am now switching to it and it is located at thetofu.com. So I will no longer be on livejournal. I have been using lj since 2002. I hope to get the same mileage out of this. I believe as it evolves it will be really nice.


The current state of the blog.

Right now, the evolution of this blog will be a tutorial on building a PubSub XMPP application. There are two ways to think about pubsub nodes, similar to two ways to think about URLs in HTTP. First, we have a generic pubsub node that just handles publishing and subscribing. Nothing else extra happens when you actually publish to a node. Only what is described in the protocol. Similar to a URL with a static file. The resource is just a file and nothing else happens when you try to GET that resource. Second, as Ralph Meijer puts it, 'The node is code'. Meaning, when you publish, something else happens beyond the publishing and notification to the subscribers. Similar to if you write a CGI or php script and it is a URL. Code is run when you act on the URL or Node in the case of Pubsub. You could also have other code publish to nodes. I want to touch on both methods to show the simplicity and power of pubsub in XMPP.

So, blogs are just web logs where an author publishes an entry and people can view it via a URL. The concept is simple and with this blog software, I hope it is the same. Currently, this software uses XMPP and its Publish Subscribe extension. (XEP-0060) A generic pubsub node is used, and logged by a subscriber, when an event happens. The log is turned to html and shown at htpp://thetofu.com. In a sense, it is a pubsub logger.

You can view get the source to this at the following URL :

http://github.com/twonds/thetofu.com/tree/master

There are two parts, a manager that posts files via the command line. And a listener named blogear that subscribes to a node and generates html based on templates. Currently, the method to post does not matter. I chose the command line because it is easier for me. I want to have other methods like a web application to publish and manage items.

The code is written in python using wokkel and twisted. The template engine is Cheetah.

Next posts will contain more details about how it works and the atom payload in the events.


The future of the blog.

There is a lot that can be done or should be done. Here is a list. This list will of course change over time.