Sunday, February 15, 2009

Bridge, Kamaelia and XMPP on IronPython

Kamaelia is a Python concurrency library that uses Python coroutines (generators). Despite being pure Python it is powerful enough for streaming audio and video. Bugs in IronPython 1 prevented Kamaelia running on IronPython, but that doesn't seem to be the case for IronPython 2...

Sylvain Hellegouarch has a Python library called headstock for communicating over XMPP:
For a while IronPython had severe shortcomings that prevented it running simple Kamaelia applications. Today I was able to run a simplechat demo using a vanilla IP2 on Windows with only one single modification to the logging module (thanks Seo). To be honest I didn’t expect it to go through :)

The chat demo is simple enough but means more complex examples using XMPP PubSub will work as well (they are all based on the same framework).

Now this isn’t production ready or anything. For instance the TLS support is broken (hopefully something easy enough to fix) so you won’t be able to connect to Google Talk for now.

Moreover I’m not sure the code is that fast considering how I had to simulate an incremental XML parser atop System.Xml (this allows for a XML stream to be parsed without requiring the full document or even fragment to be read first).

This is a great news for me because it means I’ll be able to move ahead with more work using IronPython 2.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.