August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

Cookbook/PipelinesAndGraphlinesDiscuss

I've been wanted to write something like this for ages, so it's cool to see this :-)

I have some concerns about this page, which revolve around this idea from the Kamaelia Principles Page:

As a result, in the spirit of improving this page, some hopefully constructive criticism:

This page is really 2 pages (perhaps even part of a sequence/progression like MiniAxon!) - one about pipelines and one about graphlines - it's trying to do too much. Creating 2 pages base on this (and linked from this ala the MiniAxon tutorial) would be really cool :-)

Repace PureTransformer with something real or simply drop it ( lambda in a tutorial? :-)

If all inboxes & outboxes are linked, in initial diagrams on the page, perhaps use the sort of diagram the Visual Pipe Builder used to show (ie single line :-) )

Consider building the diagrams with Compose and snapshotting those instead :-)

I prefer the approach taken with the Graphlines example over that of the pipeline - ie taking a real example which is in the Examples directory and using that to talk about. More specifically, the Graphline example is an example that has general usefulness, whereas I'm unconvinced of the general usefulness of the Pipeline example. (Sure I'd find it useful, maybe, but... :-)

Final point: don't start off saying "these are chassis". It's very useful to finish on that point, but starting on it confuses things. Consider:

And:

Followed by:

And hey, actually, this is a general principle - you can have components you give components to and they get wired up

Hey that's just like a chassis with a car isn't that cool?

But hey look, you do that with SimpleServer - a tutorial for another time

And look, that's what the Carousel is - and that's another tutorial for another time

Let me see if that Kathy Sierra page is around still... It is it's here - the part I'm thinking of is where she starts talking about superpowers. (The miniaxon tutorial kinda does this without thinking... and then stops...)

Oh, and consider also:

All that said, something is (almost :) always more useful than nothing, so many thanks who-ever wrote the first draft - rewriting (docs) almost always easier than writing :-) (The (hopefully constructive) criticism above is certainly easier to write than the first draft)

Oh, and as I say above, I've been wanted to write something like this for ages, but it's cool to see this :-)

-- Michael Sparks, 17 December 2006


Thanks for the feedback.

Things I've not done (yet):


I'll do some more editing tomorrow :)

-- Matt Hammond, 17 Dec 2006

The comment about a page for Carousel was a bit of a side joke - I don't have a problem with balancing power vs complexity - it's just that the latter is a lot harder to explain. I think it really comes under the concept of a higher order component (as chassises/ chasses? (sp?)) are, and hence that's probably why it's more awkward. (I really think you'd need to have some sort of animation to make it clear to be honest!)

Regarding the encapsulation, true - that can be handled by some light editting after perhaps. If not, I can always put a santa hat on it too :).
Something worth bearing in mind - perhaps:

Each of these aspects are all independent topics - at least in my mind. Each step gives you an extra level of power. For example, consider the following plan for developing Compose (which I accidentally wiped a while back):

By their very nature, a description of Pipeline/Graphline could follow a similar path (doesn't have to), but it does allude to the "just a container" vs "not just a container" nature.

As for the final comment on piplelines, bear in mind that just because they're (at present) only really used by you (as far as I can tell), that doesn't mean that they need a rethink :). (I can use it BTW, it's just that I often find a different method instead, at present).

Also, there's no rush :)

-- Michael Sparks, 17 December 2006


I've stuck with the current diagram style for the moment, but added extra, simplified, diagrams hopefully better demonstrate the pipeline concept.

I've also fleshed out the explanations a little starting more from the perspective of simply wanting to chain the components together. The greater detail level around using a pipeline as a container, and the detail of how the wiring is done as been separated a little by grouping it under more distinct headings - hopefully giving a natural break point for those who aren't interested in reading that far.

Your "final comment" was wrt. Carousels? :-)

-- Matt Hammond, 18 December 2006