April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.

Release Notes

Kamaelia 0.2.0

SUMMARY

New Examples

4 new examples showing of various new subsystem:

Example 5 : An introspecting version of Examples 2/3. This creates a simple streaming system, and looks inside to see what components are running/active, and passes the resulting information over a network connection to an Axon Visualisation server.

Example 6 : This is a simple/generic topology visualisation server. The server listens on port 1500, and accepts the following commands:

As this stands this is pretty useful, but that's pretty much everything it does like this.

Example 7 : This shows how the visualisation subsystem can be extended to work in different ways. What this does by default when run is randomly create new nodes and new linkages quite quickly, allowing you to see how the system works.

Example 8 : Sample slideshow/presentation tool. Unlike traditional slideshow/presentation tools, you can modify this to run arbitrary components. An example of how this can work is provided - allowing stepping through some graph visualisations along with the presentation.

New Tools

Axon Shell. Implements a simple command line shell which allows experimentation with Axon systems - the shell runs a scheduler in the background. For a tutorial of use, see:

Axon Visualiser.Implements a simple tool for looking inside (quite literally) running Axon/Kamaelia systems. This allows a very different style of debugging and can be extremely useful. Tutorial on its way!

Graphlines and Pipelines

These are probably the most useful additions to Kamaelia since 0.1.2. They are essentially syntactic sugar for building and working with systems of components, but make building interesting systems rapidly out of pre-existing components fun and easy. The pipelines follow the same sort of model as the Unix pipeline. Graphlines are something new, and like pipelines and all linkages may take any data along them.

They're also probably best explained by example, so since these are release notes, I'll just present a couple of examples here.

A graphline representing a simple presentation tool:

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)),
FIRST = Button(caption="First", msg="FIRST",position=(256,8)),
LAST = Button(caption="Last", msg="LAST",position=(320,8)),
linkages = {

}

).run()

A pipeline representing a trivial multicast streaming server

pipeline(

).activate()

A pipeline representing a trivial multicast streaming client:

pipeline(

).run()

New Packages & Subsystems

These names should provide you with a flavour of the new subsystems that have been added:

New Components

This section gives an overview of what's new in terms of actual new files.

Examples/ -- example5, example6, example7, example8

Kamaelia/Data/ -- MimeDict.py

Kamaelia/Internet/ -- ThreadedTCPClient.py

Kamaelia/ -- SingleServer.py

Kamaelia/Physics/ -- __init__.py

Kamaelia/UI/ -- __init__.py, PygameDisplay.py

Kamaelia/Util/ -- Chooser.py, Comparator.py, Graphline.py, Introspector.py, LossyConnector.py, MarshallComponent.py, NullSinkComponent.py, passThrough.py, PipelineComponent.py, Splitter.py, TestResultComponent.py

Kamaelia/Visualisation/ -- __init__.py

Changed & Updated

All updated siles & classes at a glance:

Large scale common changes

Detailed Release Notes

Kamaelia-0.2.0/AUTHORS

Modified

Added

Kamaelia-0.2.0/CHANGELOG

NEW STUFF!

Kamaelia-0.2.0/Examples/example5/

This is a new example, it is an introspecting version of the SimpleStreamingSystem.py examples. This allows you to see inside a running streamer server and client system and see what's actually happening inside.

It is essentially very similar to the old version of Example2, but with the addition of introspection components

New files:

Kamaelia-0.2.0/Examples/example6/

This is a new example - a topology visualiser. This takes textual commands from a single socket and renders the resulting graph.

Example

This draw and lays out and simple system linking 2 nodes, using a simple physics type engine for layout

New files:

Kamaelia-0.2.0/Examples/example7/

This is a more complex (new) example of using the topology/graph viewing code. It extends the system to add in some new node types/behaviour via the code in the BasicGraphVisualisation directory.

New files:

Kamaelia-0.2.0/Examples/example8/

Another new example - this one showing how to bolt together existing Pygame based components using the simplistic "window" manager (more surface manage really) to place mutiple buttons, image viewers etc into a single display, and link them together tio form a simple slideshow tool, which can be used for presentations. Includes a small number of slides from the Europython talk about Kamaelia.

This is also probably the nicest example (and the first example) of how a Graphline can be of real use to make a system more declarative and clearer.

New files:

Kamaelia-0.2.0/Examples/README

Updated to document the 4 new examples. Copied here for convenience.

Example 5 : An introspecting version of Examples 2/3. This creates a simple streaming system, and looks inside to see what components are running/active, and passes the resulting information over a network connection to an Axon Visualisation server.

Example 6 : This is a simple/generic topology visualisation server. The server listens on port 1500, and accepts the following commands:

As this stands this is pretty useful, but that's pretty much everything it does like this.

Example 7 : This shows how the visualisation subsystem can be extended to work in different ways. What this does by default when run is randomly create new nodes and new linkages quite quickly, allowing you to see how the system works.

Example 8 : Sample slideshow/presentation tool. Unlike traditional slideshow/presentation tools, you can modify this to run arbitrary components. An example of how this can work is provided - allowing stepping through some graph visualisations along with the presentation.

Kamaelia-0.2.0/Kamaelia/Data/MimeDict.py

Kamaelia-0.2.0/Kamaelia/Internet/ThreadedTCPClient.py

New component

Provides the same interface from a component user perspective to the TCPClient.py class

Originally written because at the time Nokia Series 60 mobiles only supported blocking sockets.

Kamaelia-0.2.0/Kamaelia/Physics/__init__.py

Kamaelia-0.2.0/Kamaelia/Physics/Simple/__init__.py

Kamaelia-0.2.0/Kamaelia/Physics/Simple/MultipleLaws.py

New subsystem

Physics code for forces between particles. Unbonded force acts between all non bonded particles. Bonded force acts between bonded particles. Contains the following classes:

Kamaelia-0.2.0/Kamaelia/Physics/Simple/Particle.py

New subsystem

Physics code for forces between particles. Unbonded force acts between all non bonded particles. Bonded force acts between bonded particles. Contains the following classes:

Kamaelia-0.2.0/Kamaelia/Physics/Simple/ParticleSystem.py

New subsystem

Contains class:

Kamaelia-0.2.0/Kamaelia/Physics/Simple/SimpleLaws.py

New subsystem

Contains class:

Kamaelia-0.2.0/Kamaelia/Physics/Simple/SpatialIndexer.py

New subsystem

Probably the most generally useful addition to the core of Kamaelia from the Physics subsytem. Provides a Spatial Indexer class that:

Kamaelia-0.2.0/Kamaelia/SingleServer.py

Kamaelia-0.2.0/Kamaelia/UI/__init__.py

Kamaelia-0.2.0/Kamaelia/UI/MH/__init__.py

Kamaelia-0.2.0/Kamaelia/UI/MH/DragHandler.py

Kamaelia-0.2.0/Kamaelia/UI/MH/PyGameApp.py

Kamaelia-0.2.0/Kamaelia/UI/Pygame/Button.py

Kamaelia-0.2.0/Kamaelia/UI/Pygame/Image.py

Part of the new Pygame subsystem

Sits happily inside the PygameDisplay service

Implements a image display component.

Example 8 uses this component

Kamaelia-0.2.0/Kamaelia/UI/Pygame/Multiclick.py

Kamaelia-0.2.0/Kamaelia/UI/Pygame/Ticker.py

Kamaelia-0.2.0/Kamaelia/UI/PygameDisplay.py

Simple window/surface manager component.

Registers a service called "pygamedisplay", where components may request a display from.

These displays are then blitted to the display once every tick of the PygameDisplay component

Currently all events are global, but the pygame display could change that.

Handles the farming out of pygame events to components as well.

Simple tests of bouncing surfaces (tickers, images) round the screeen whilst the other components are running shows that this can happen without confusing the components using those displays. (Largely due to single writer semantics always being preserved)

Conceptually very similar to a TCP Server / primary listen socket vs connected socket adaptor issue.

Kamaelia-0.2.0/Kamaelia/Util/Chooser.py

Kamaelia-0.2.0/Kamaelia/Util/Comparator.py

New component

This class was originally written to assist in testing by making it easy to compare an expected data stream with that from the tested system. This is the current equality test between the two inputs. It's been realised however that this can be generalised by making an overidable compare function to do the real work. This is therefore a general system for combining two inputs into a single output!

Kamaelia-0.2.0/Kamaelia/Util/Graphline.py

New component

Provides syntactic sugar for making pipeline type systems trivial, but in the the form of arbitrary graphs, not just 1D pipes

Example 8 provides the nice example:

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)),
FIRST = Button(caption="First", msg="FIRST",position=(256,8)),
LAST = Button(caption="Last", msg="LAST",position=(320,8)),
linkages = {

}

).run()

Kamaelia-0.2.0/Kamaelia/Util/Introspector.py

Kamaelia-0.2.0/Kamaelia/Util/LossyConnector.py

Kamaelia-0.2.0/Kamaelia/Util/MarshallComponent.py

New component

Basic Marshalling Component
The Basic Marshalling Component is given a simple class. It then expects to be passed objects of that class, and then performs the following actions:

The idea is that you would place this between your logic and a network socket, which simply serialises and deserialises objects for transmission over the wire. The initial data format this is designed to work with is the MimeDict object.

For simplicity, this component expects to be given an entire object to marshall/demarshall. This requires the user to deal with framing of objects. It is expected that there will be a more complex marshaller that is capable of taking (say) a generator or component as an argument for the fromString static method.

Since this is a bidirectional component we have the following boxes:

Kamaelia-0.2.0/Kamaelia/Util/NullSinkComponent.py

Kamaelia-0.2.0/Kamaelia/Util/passThrough.py

Kamaelia-0.2.0/Kamaelia/Util/PipelineComponent.py

New component

Provides syntactic sugar for making pipeline type systems trivial.

A nice example is from example 4, where 2 pipelines are put together to build a simplistic multicast streaming system as follows:

Server:

pipeline(

).activate()

Client

pipeline(

).run()

Kamaelia-0.2.0/Kamaelia/Util/Splitter.py

Kamaelia-0.2.0/Kamaelia/Util/TestResultComponent.py

New component

DO NOT USE IN LIVE SYSTEMS. This class is largely intended for use is system testing and particularly unit testing of other components. In the case of error or request it is intended to throw an exception stop the Axon system and jump back to the unit test.

Kamaelia-0.2.0/Kamaelia/Visualisation/__init__.py

Kamaelia-0.2.0/Kamaelia/Visualisation/Axon/__init__.py

Kamaelia-0.2.0/Kamaelia/Visualisation/Axon/AxonLaws.py

Kamaelia-0.2.0/Kamaelia/Visualisation/Axon/AxonVisualiserServer.py

Kamaelia-0.2.0/Kamaelia/Visualisation/Axon/ExtraWindowFurniture.py

Kamaelia-0.2.0/Kamaelia/Visualisation/Axon/PComponent.py

Kamaelia-0.2.0/Kamaelia/Visualisation/Axon/PPostbox.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/__init__.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/chunks_to_lines.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/lines_to_tokenlists.py

New component - related to provide a convenient interface to the topology subststem.

Takes in lines and outputs a list of tokens on each line.

Tokens are separated by white space.

Tokens can be encapsulated with single or double quote marks, allowing you to include white space. If you do this, backslashs should be used to escape a quote mark that you want to include within the token. Represent backslash with a double backslash.

Example:

Becomes:

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/GridRenderer.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/ParticleDragger.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/RenderingParticle.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/TopologyViewerComponent.py

Kamaelia-0.2.0/Kamaelia/Visualisation/PhysicsGraph/TopologyViewerServer.py

Kamaelia-0.2.0/Kamaelia/vorbisDecodeComponent.py

Kamaelia-0.2.0/PKG-INFO

Kamaelia-0.2.0/setup.py

Added packages:

Kamaelia-0.2.0/Tools/axonshell.py

New tool. Implements a simple command line shell which allows experimentation with Axon systems - the shell runs a scheduler in the background. For a tutorial of use, see:

Kamaelia-0.2.0/Tools/AxonVisualiser.py

UPDATED AND CHANGED

Kamaelia-0.2.0/Kamaelia/Util/ToStringComponent.py

Kamaelia-0.2.0/Kamaelia/Util/ConsoleEcho.py

Kamaelia-0.2.0/Kamaelia/Util/Chargen.py

Kamaelia-0.2.0/Kamaelia/test/SynchronousLinks_SystemTest.py

Kamaelia-0.2.0/Kamaelia/SimpleServerComponent.py

Kamaelia-0.2.0/Kamaelia/Protocol/AudioCookieProtocol.py

Kamaelia-0.2.0/Kamaelia/Protocol/EchoProtocolComponent.py

Kamaelia-0.2.0/Kamaelia/Protocol/FortuneCookieProtocol.py

Kamaelia-0.2.0/Kamaelia/Protocol/HTTPServer.py

Kamaelia-0.2.0/Kamaelia/ReadFileAdaptor.py

Kamaelia-0.2.0/Kamaelia/SampleTemplateComponent.py

Kamaelia-0.2.0/Kamaelia/MimeRequestComponent.py

Kamaelia-0.2.0/Kamaelia/Internet/test/test_BasicMulticastSystem.py

Kamaelia-0.2.0/Kamaelia/__init__.py

Kamaelia-0.2.0/Kamaelia/Internet/ConnectedSocketAdapter.py

Kamaelia-0.2.0/Kamaelia/Internet/Multicast_receiver.py

Change from using self.__super to using super(klass, self) ... on the advice of Michele Simionato

Kamaelia-0.2.0/Kamaelia/Internet/Multicast_sender.py

Change from using self.__super to using super(klass, self) ... on the advice of Michele Simionato

Kamaelia-0.2.0/Kamaelia/Internet/Multicast_transceiver.py

Change from using self.__super to using super(klass, self) ... on the advice of Michele Simionato

Better handling when our sending fails first time round.

Kamaelia-0.2.0/Kamaelia/Internet/Selector.py

Kamaelia-0.2.0/Kamaelia/Internet/TCPClient.py

Kamaelia-0.2.0/Kamaelia/Internet/TCPServer.py

Kamaelia-0.2.0/Examples/example4/README

Kamaelia-0.2.0/Examples/example1/FortuneCookie_ServerClient.py

Kamaelia-0.2.0/Examples/example1/README

Kamaelia-0.2.0/Examples/example2/README

Kamaelia-0.2.0/Examples/example2/SimpleStreamingSystem.py

Kamaelia-0.2.0/Examples/example3/README

Kamaelia-0.2.0/Examples/example3/SimpleStreamer.py

Kamaelia-0.2.0/Examples/example3/SimpleStreamingClient.py

Kamaelia-0.2.0/Examples/example4/MulticastStreamingClient.py

Kamaelia-0.2.0/Examples/example4/MulticastStreamingSystem.py

Kamaelia-0.2.0/Docs/index.html