Kamaelia: Pragmatic Concurrency, A tutorial
This was a tutorial held at Europython '09 in Birmingham on the morning of Sunday 28 June
Why use concurrency?
Since concurrency is viewed as an advanced topic by many developers, this question is often overlooked. However, many real world systems, including transportation, companies, electronics and Unix systems are highly concurrent and accessible by the majority of people. So, one motivation can be "many hands make light work".
However, with software this maxim often appears to be false - in no small part due to the tools we use to create concurrent systems. Despite this, the need for concurrency often creeps into many systems - even something as basic as "attaching a debugger".
Kamaelia is a toolset and mindset aimed at assisting in structuring your code such that you can focus on the problem you want to solve, but in a way that results in naturally reusable code that happens to be concurrent.
AxonKamaelia was designed originally to make maintenance of highly concurrent network systems simpler, but has general application in a wider variety of problem domains, including desktop applications, web backend systems (eg video transcode & SMS services), through to tools for teaching a child to read and write.All Kamaelia systems are dependent on this core library - it provides you with tools for making systems which are naturally concurrent. Its primary metaphor is components with inboxes and outboxes, which get linked by parent components.Kamaelia ComponentsThe bulk of Kamaelia is actually a large collection of components. By themselves each component is useful, but their real power comes from being linked to each other, like programs in /usr/bin get linked together, forming pipelines.ApplicationsThis is the point of Kamaelia - to build useful systems. Kamaelia was originally designed for naturally concurrent problems, so there was a desire to make this simple(r) to work with. Using Axon based components means applications generate more reusable components, and also have a naturally concurrent structure. This can simplify many applications, allowing their reuse in unexpected ways.Testing & DebuggingTesting & debugging concurrent systems is considered hard, we'll cover some approaches we can use in Kamaelia for debugging systems. Some of these are surprisingly familiar. Indeed, some can be used in non-Kamaelia based systems.
More InformationThe rest of this website obviously contains more information, and based on lots of feedback, it does need work, but please do tell us how you think it needs work.
Also, a number of presentations have been made in the past. You can find these Kamaelia presentations on slideshare.
The notes are available in 3 forms:
The slides used in the tutorial are available on slideshare. As you might expect, different media have different benefits, and so each way of explaining things covers the same things in slightly different ways, but following a common theme.
Videos will go up on blip.tv, and are currently being transcoded.
Two relevant downloads are also available:
This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)
(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved