Kamaelia: The future of Python Frameworks looks promising.
May 10th, 2008 byKamaelia is a general purpose Python framework developed by BBC Research.
http://kamaelia.sourceforge.net/Home
It is what I would consider a second generation framework. It has a mature level of feature and plug-in support, and a naturally extensible model, two things which are either rare in most frameworks, or too difficult to be practical. Audio and video plug-in support is amazingly clean in the Kamaelia examples. The Kamaelia kernel, named Axon, is the core component for module execution. Module intercommunication happens via pipes, so the issue of the context switch slowness for threaded apps is not an issue here.
Kamaelia also supports OS level threading, but this support seems to be nested down into the TCP protocol module. Nevertheless, the snap-together pipe model is tempting for any app, since it’s quite easy to grok. The code examples are exactly what Python enthusiasts have come to expect: clean, short, and almost intuitive.
Like many great tools, it comfortably straddles the line between tool and toy, with clean integration of pygame, as well as the support of many common protcols (HTTP, Torrent, etc.) and audio and video codecs (Vorbis, Wav, etc.) supplemented by a solid engine.
The component list for Kamaelia is called the Component Toybox, setting the tone for this project. We are encouraged to play, and novice contributors are encouraged to join and contribute. This is what I love the most about this project. It is unpretentious, approachable by anyone who wants to learn and contribute, and it is well organized and well designed. The documentation flows smoothly, although I’d love to see more detail on helping newbies find, install and configure all of the dependencies for the dependencies for each architecture. Pygame, for example, needs SDL development libs to run the provided examples. But newbies are stuck calling friends like me to explain this to them and help them past the installation hump. This is a difficult problem to resolve in any toolset dependent on many external toolsets, having their own development paths and practices. Maybe the Python buildout tool, plus some additional scripting could resolve this issue?
This framework is exciting. It opens the possibilities of faster web and app based integration of tools and tricks. It makes you ponder the infinite possibilities of nested protocol support, not just encapsulation of protocols within HTTP. Python development just keeps getting better and more fun, and this is most certainly a project to watch for ideas and possibilities of things to come.
Gloria


May 13th, 2008 at 6:27 pm
[...] » Kamaelia: The future of Python Frameworks looks promising. - DevChix - Blog Archive (tags: framework python kamaelia) [...]
May 13th, 2008 at 7:59 pm
Hi,
Nice article Gloria. Interesting to see more options (though hopefully not too many) coming up in the Python web framework arena. Just a question about your personal feeling on this-
Is it better (given the availability of resources and enough time) to develop a website from scratch without using any framework or would you still recommend using a framework?
Thanks,
z0ltan.
May 13th, 2008 at 9:52 pm
Timmy,
Just to clarify a point, Kamaelia isn’t a web framework (although there’s absolutely no reason why it can’t be used as one).
May 13th, 2008 at 11:39 pm
Timmy: Just to clarify, Kamaelia is not a web framework. It’s a toolbox of various tools in various fields (networking, web, UI, video, audio, etc.)
Think of it like a Twisted competitor.
That being said, some people have a particular interest in adding WSGI support to the toolbox so that it’ll offer a bridge to existing web tools.
May 15th, 2008 at 1:28 pm
Hi Timmy,
It is certainly a likely candidate for a future web framework. A very nice web framework could be built using Kamaelia.
The beauty of it, I think, is it’s inherent ability to easily provide protocol plugin support. Imagine a web framework which supported the SIP protocol as a snap-in option, and now you can start to see why this is so great.
It is a more mature Twisted, with rich protocol options, the ability to add your own protocols and media/device support in an easy-to-grok, standard way, and the ability to choose between green threading or OS level threading. Not bad at all.
To answer your other question, I would say, in Python, there is a proper tool for almost every need.
If your web site is fairly standard, start with CherryPy, SqlAlchemy and CherryTemplate for your framework. I’ve used this combination on five production grade projects (two with huge monolithic data sets, three with smaller dynamic data sets) with outstanding success. The code turned out clean, the design turned out as I had envisioned, and the performance was excellent, even on a crappy server.
If your web site is more complex, for example SIP protocol support, for, let’s say, automatic gas meter reading at people’s homes, or something like this, use Kamaelia. If you’re writing a gaming web framework, or some amazing streaming protocol engine, start with Kamaelia.