To extend SEER, you can add an Agent, a Service, a Collector, an Aggregator, or a GUI plugin
#.. image:: /images/backend.png
An Agent responds to commands from the GUI or a script and actually performs some type of task. This could be running a program, starting a daemon process or processing data. You can think of an agent as a class. An agent group is an instance of that class that is also copied across all nodes where the group variables are instance variables. When you send a messages to an agent group, it is sent to that same instance on each node. While each instance may do different things based on their node name, addresses or other state, the variables for that group are the same across all nodes.
A Service is simply some software that can be used by several different agents, somewhat like a shared library except that it is a singleton object and instance variables are shared between all callers.
A Collector is used to collect data such as packet counts, files, or other data and send them to the control node.
An Aggregator is used to receive collected data from each node, process it, store it and provide it to GUI nodes or other controlling nodes.
Upon implementing your own module, you may also want to make use of services that are already available. Another service module such as ‘myService’ can be used by importing services. There is also a testbed service that can be used by importing testbed. This gives you access to the local testbed information such as node name, interface addresses, project and experiment name, topology info, etc.
from services import services
from testbed import testbed
# Use myService
services.myService.doSomething()
# Get the node name that has the IP address 1.2.3.4
testbed.getNodeForIP("1.2.3.4")
#.. image:: /images/gui.png
SEER provides a GUI interface to control agents and view data and logs from the experiment. You are free to connect to the SEER messaging network with your own GUI, however, you may be able to extend the GUI to provide the features you want.
Upon startup, the GUI will connect to the SEER messaging network and request information on the agents that are currently loaded. This data contains class variables from each python agent which are used to contstruct the control panels that you see in the GUI. The first place you may want to extend the GUI is to provide a more sophisticated panel for your own agent. See GUI Plugins.
Agents aside, there are a couple other places to add functionality into the GUI. Each tab in the GUI implements GUIComponent. If you provide another class that implements GUIComponent and descends from JComponent, it will be added as its own tab. If it does not descend from JComponent, it will remain hidden. Each GUIComponent can be acted upon by the GUI through dataReceived. dataReceived is called when: * a new experiment is attached * a new testbed interface is created * new topology and layout information received from the testbed * a new storage instance is to be used * data received from the experiment The data from the experiment could be a response to a request or pushed from the controller. The data objects are passed to every GUIComponent in a non-deterministic order.