Wiring up components in a Pipeline
The Pipeline component wires up a set of components in a linear chain (a Pipeline) and encapsulates them as a single component.
A simple pipeline of 4 components:
Pipeline(MyDataSource(...), MyFirstStageOfProcessing(...), MySecondStageOfProcessing(...), MyDestination(...), ).run()
A Pipeline component gives you a way of wiring up a system of components in a chain and then encapsulating the whole as a single component. The inboxes of this component pass through to the inboxes of the first component in the Pipeline, and the outboxes of the last component pass through to the outboxes of the Pipeline component.
The components you specify are registered as children of the Pipeline component. When Pipeline is activate, all children are wired up and activated.
For the components in the Pipeline, "outbox" outboxes are wired to "inbox" inboxes, and "signal" outboxes are wired to "control" inboxes. They are wired up in the order in which you specify them - data will flow through the chain from first component to last.
The "inbox" and "control" inboxes of the Pipeline component are wired to pass-through to the "inbox" and "control" inboxes (respectively) of the first component in the Pipeline chain.
The "outbox" and "signal" outboxes of the last component in the Pipeline chain are wired to pass-through to the "outbox" and "signal" outboxes (respectively) of the Pipeline component.
During runtime, the Pipeline component monitors the child components. It will terminate if, and only if, all the child components have also terminated.
NOTE that if your child components create additional components themselves, the Pipeline component will not know about them. It only monitors the components it was originally told about.
Pipeline does not intercept any of its inboxes or outboxes. It ignores whatever traffic flows through them.
Pipeline(*components) -> new Pipeline component.
Encapsulates the specified set of components and wires them up in a chain (a Pipeline) in the order you provided them.
Methods defined here
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Unplugs any children that have terminated, and returns true if there are no running child components left (ie. their microproceses have finished)
Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!
Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.
-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT
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.