Detecting the topology of a running Axon system
The Introspector is a component that introspects the current local topology of an Axon system - that is what components there are and how they are wired up.
It continually outputs any changes that occur to the topology.
Introspect and display whats going on inside the system:
MyComplexSystem().activate() pipeline( Introspector(), AxonVisualiserServer(noServer=True), )
Once activated, this component introspects the current local topology of an Axon system.
Local? This component examines its scheduler to find components and postmen. It then examines them to determine their inboxes and outboxes and the linkages between them. In effect, it determines the current topology of the system.
If this component is not active, then it will see no scheduler and will report nothing.
What is output is how the topology changes. Immediately after activation, the topology is assumed to be empty, so the first set of changes describes adding nodes and linkages to the topology to build up the current state of it.
Subsequent output just describes the changes - adding or deleting linkages and nodes as appropriate.
Nodes in the topology represent components and postboxes. A linkage between a component node and a postbox node expresses the fact that that postbox belongs to that component. A linkage between two postboxes represents a linkage in the Axon system, from one component to another.
This topology change data is output as string containing one or more lines. It is output through the "outbox" outbox. Each line may be one of the following:
the <id> and <name> fields may be encapsulated in double quote marks ("). This will definitely be so if they contain space characters.
If there are no topology changes then nothing is output.
This component ignores anything arriving at its "inbox" inbox.
If a shutdownMicroprocess message is received on the "control" inbox, it is sent on to the "signal" outbox and the component will terminate.
Every execution timeslice, Introspector queries its scheduler to obtain a list of all components. It then queries the postoffice in each component to build a picture of all linkages between components. It also builds a list of all inboxes and outboxes on each component.
This is mapped to a list of nodes and linkages. Nodes being components and postboxes; and linkages being what postboxes belong to what components, and what postboxes are linked to what postboxes.
This is compared against the nodes and linkages from the previous cycle of processing to determine what has changed. The changes are then output as a sequence of "ADD NODE", "DEL NODE", "ADD LINK" and "DEL LINK" commands.
Introspector() -> new Introspector component.
Outputs topology (change) data describing what components there are, and how they are wired inside the running Axon system.
Methods defined here
introspect() -> components, postboxes, linkages
Returns the current set of components, postboxes and interpostbox linkages.
Methods inherited from Axon.Component.component :
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, 01 Feb 2010 at 04:00:28 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