ANN: Kamaelia 0.2.0 released!

Michael Sparks michaels at rd.bbc.co.uk
Tue Aug 2 06:05:16 EDT 2005


Phil Hunt wrote:

> Kamaelia seems it might be an interesting project. However, I don't
> think the project is well served by this announcement -- which I 
> find vague and hard to understand. Which is a shame, because it
> means that other people probably don't understand it very well
> either, which means less people will use it.

It is a shame, and thanks for mentioning this. Let me have another
go :-) (ripping to shreds welcome :)

OK, here's a better go. (It's always difficult to think where to pitch
this sort of thing)
---START---
The project aims to make it simple to build networked multimedia
systems (eg audio, video, interactive systems), which are naturally
componentised and naturally concurrent allowing quick and fast reuse in
the same way as Unix pipelines do. 

It is designed as a practical toolkit, such that you can build systems
such as:
   * Ogg Vorbis streaming server/client systems (via vorbissimple)
   * Simple network aware games (via pygame)
   * Quickly build TCP based network servers and clients
   * Quickly build Multicast based network servers and clients

It runs on Linux, Window, Mac OS X with a subset running on Series 60
phones.

The basic underlying metaphor of a component us like an office worker
with inboxes and outboxes, with deliveries occuring between desks,
offices, and depts. The component can thus do work anyway it likes but
only communicates with these inboxes and outboxes. Like office workers,
components run in parallel, and to achieve this are generally
implemented using python generators, but can also used threads.

The rationale behind the project is to provide a toolkit enabling the
development of new protocols, including streaming, for large scale
media delivery. The license essentially allows use in proprietary
systems without change, but all changes to the system itself must be
shared.
---END---

Is that clearer ? 

A short summary of all that could be:

"""Kamaelia is a networking/communications infrastructure for innovative
multimedia systems. Kamaelia uses a component architecture designed to
simplify creation and testing of new protocols and large scale media
delivery systems."""

Hopefully that's clearer than:

>>Kamaelia is a collection of Axon components designed for network
>>protocol experimentation in a single threaded, select based
>>environment. Axon components are python generators are augmented by
>>inbox and outbox queues (lists) for communication in a communicating
>>sequential processes (CSP) like fashion.

[ which you noted "I really have very little idea what this means." ]

> The information I can guess out of this is: "Kamaelia is a library
> for creating network protocols that sit on top of tcp and/or udp".
> Given that it's a BBC project, I imagine we're talking about
> protocols for transferring large amount of data, e.g. sound or
> motion pictures.

Indeed. However, if you're having to guess I'm not doing the best job
(despite trying!) at explaining this.

>>More background on the motivations behind Kamaelia
>>can be found here: http://kamaelia.sourceforge.net/Challenges/
> 
> There's something interesting here:
> 
>   In Building Public Value, the BBC has committed to the delivery of
>   BBC content to the British Public over this multitude of systems,
>   in a way that is enjoyable, accessible and **repurposable** by the
>   British Public in the way they choose.
> 
> (my emphasis)
> 
> This is a laudable aim, but if the BBC want to do this, the first
> step they could make is to open up their content under a Creative
> Commons licence.

<not such a wise thing for me to reply to, but please read the
 disclaimer at the bottom, these are personal opinions only>

I would suggest that you forward this comment directly to the team
involved in working on the Creative Archive. You can do this via this
URL:
   * http://creativearchive.bbc.co.uk/

This is unfortunately not as simple as "just putting stuff up", and any
comments you have, I'm sure would be welcome. However, the Creative
Archive hasn't yet been put to a Public Value Test (including impact on
industry), and rights is a much more problematic issue than you might
expect. (eg background music on the radio in eastenders, posters on
people's walls...)

There's also http://www.bbc.co.uk/info/contactus/form.shtml which might
be more appropriate.

On a positive note, the Creative Archive has more organisations involved
than just the BBC, it inlucde the BFI , Channel 4, Open University &
Teachers'TV, so even if these things take longer than some people might
like they do seem to be moving. Public organisations are weighed down
whether the should do something, as well as whether they can.

BBC R&D's role in this is to make these decisions possible.

> They could start with their news, current affairs 
> and documentaries. 

BBC Backstage is a start here - at least with some of the online
content. (http://backstage.bbc.co.uk)

> But the download only staryed up for a week, and they didn't put the
> files under a CC license, so they could be redistributed. Why not? It
> would have cost them no more to do so than what they did, and
> would've provided better value for downloaders and music lovers.

I can pass on that request if you're interested in an answer - I'm not
personally aware of the rationale behind it only being up for a week.

</not such a wise thing for me to reply to, but please read the
 disclaimer at the bottom, these are personal opinions only>

> BTW, the html is broken in that it's very poorly written, 

It's written using a PyQT based WYSIWYG editor (written on my time,
not the BBC's) that has the limitation that preformatted text gets
squished (since the editor doesn't support the pre tag - or indeed
a lot of other tags). At some point I'll fix the editor to handle
pre-formatted text, but it's not a priority right now. (Should it be?)

The HTML isn't really *that* bad as far as generated code is concerned
IMHO, and is directly what the PyQT QTextEdit widget creates. (It's not
that great either - you may notice it doesn't have proper headings
either)

> doesn't use CSS, 

This isn't a problem IMHO, YMMV. The site's been tested on a variety of
browsers/platforms and looks pretty much the same on all.

> I guess the main question that needs to be answered is "Why would I,
> as a programmer, use Kamaelia?"

Probably the most interesting response I've had back from people who've
picked it up is that it's FUN. You can write small sketches (throwaway
code fragments), rewrite their inputs/outputs to take data from inboxes
& outboxes, and then it's usable in a much wider system. It encourages
reuse of code, and assimilating existing systems can be relatively
trivial. 

For example, trivial sketches:
   * A program to display an image using pygame
   * A program that can understand when an area of space has been
     clicked. (call it a button)
   * A program that can print a list of filenames, pausing waiting for a
     user to press return.  (call it a chooser)

Trivial changes:
   * Take the filename of the image from an inbox
   * Rather than print the filenames to send the filename to an outbox.
   * Rather than wait for a user to press a key, wait for a message on
     an inbox.

A useful composition linking some of these together:

Graphline(
     CHOOSER = Chooser(items = files),
     IMAGE = Image(size=(800,600), position=(8,48)),
     NEXT = Button(caption="Next", msg="NEXT", position=(72,8)),
     PREVIOUS = Button(caption="Previous", msg="PREV",position=(8,8)),
     linkages = {
        ("NEXT","outbox") : ("CHOOSER","inbox"),
        ("PREVIOUS","outbox") : ("CHOOSER","inbox"),
        ("CHOOSER","outbox") : ("IMAGE","inbox"),
     }
).run()

And you have a simple presentation tool !

Another example. The visualisation framework was originally a stand
alone piece of code and was essentially just a piece of eye candy. I
threw in a few yields into certain locations. File reading & static
graph construction was replaced with recieving data from inboxes, and
then it was available for use (and networked after creating trivial
protocol components).

A piece of eye candy is now a useful tool. It's likely to gain the
ability to send to an outbox a message saying "this blob is clicked"
meaning we can have 'WYSIWYG' GUI based construction of pipelines
easily.

It's designed literally as a tool for making it simple to bolt things
together with minimal change. (Which means you choose what you
use, not the framework.)

The system also lends itself to test driven and network independent
development, something not that simple normally with network
protocols.

Why wouldn't you use it? When Twisted is appropriate (Twisted is a more
mature framework).


Michael.
-- 
Michael.Sparks at rd.bbc.co.uk, http://kamaelia.sourceforge.net/
British Broadcasting Corporation, Research and Development
Kingswood Warren, Surrey KT20 6NP

This message (and any attachments) contains personal views
which are not the views of the BBC unless specifically stated.
(THIS IS NORMALLY AT THE BOTTON OF MY EMAILS, BUT IT'S REALLY, REALLY,
REALLY THE CASE THIS TIME!!!)




More information about the Python-list mailing list