Michael Sparks, Senior Research & Development Engineer, British Broadcasting Corporation
Track: Python
Date: Wednesday, 19 October 2005
Time: 14:20 - 15:05
Location: St. John's Room II
Scalable concurrent systems do not have to be hard--this is a fundamental aim of the Kamaelia project. The real world contains large numbers of items we interact with daily on a concurrent basis, be it every electronic item we own, from kettles to computers through to simple things like roads, office workers, and dance partners.
Concurrency in software often takes three approaches: process, thread, or state machine based. For portability and scalability, state machine based systems are normally the preferred approach. However, even best of breed systems often have a steep learning curve, can be hard for beginners to learn, and can be difficult to debug.
Kamaelia represents concurrency as components communicating along unidirectional linkages. Components are Python generators embedded into a class augmented by inboxes and outboxes. New components can be written sequentially, and then made concurrent slowly and simply in a controlled fashion.
Building systems is pretty much like using good old fashioned Unix pipelines. You choose the components that do the work and string their outputs and inputs together. You can build pipelines or graphs which may also change dynamically. Components also nest simplifying systems. This approach also encourages high levels of reuse.
Using Python generators seems to result in performance similar to that of traditional state machines, with an ease of use similar to that of process based concurrency. BBC R&D is building Kamaelia as a testbed for developing open large scale internet media delivery protocols. However, this talk will focus on the core technology allowing others to use the technology for other uses.
Download presentation file