1st notification

(This post was migrated from my previous blog. Originally published: 2007-06-01 21:39:44)

It’s time for a quick update on my Summer of Code project progress. Four days have passed since the official start of coding, on May 28th, and yesterday the simplest usage scenario actually worked. Notification, that is:


On the screenshot above you can see a message from my notification bot, sent when a page I’m subscribed to was changed. The message is exactly the same for both email and Jabber notification, so i18n Just Worked™ without any additional changes. The code to make it happen was (and still is!) crude, with some hardcoded values here and there, but I feel it’s a good base for further development.

MoinMoin (note the new, funny domain) used to have no event system. Notifications of page changes used to be sent via email from within the PageEditor class itself, on page save. I’ve created a simple, plugin-based eventing “framework”, using the Observer pattern, and moved the notification code there. Then, using standard Python’s xmlrpclib module, added a tiny bit of code, that communicates with the notification (Jabber) bot.

The bot itself consists of three components, running in separate threads, which communicate through shared Queue objects. One of them is responsible for receiving and handling XML RPC requests, second one does all the work related to Jabber/XMPP communication, and third one will, in the near future, perform editing actions on wiki.

Back to coding…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s