[overview] [features] [system architecture] [getting started] [examples] [downloads] [API]
[overview] [features] [system architecture] [getting started] [examples] [downloads] [API]
[overview] [features] [system architecture] [getting started] [examples] [downloads] [API]
The GAMF provides generic control mechanisms based on an autonomic control loop and a set of interfaces to allow interaction between the control mechanism and system-specific management components (system adapters). System adapters are: event generators and effectors which allow interaction of the control mechanism with the target system; metric extractors and policy evaluators which provide the means for computing a specific response, determined by policies, to an observed situation, modelled by metrics. The following figure illustrates the general architecture by showing the components used for managing a target system. Additionally the flow of information between management components and target system is illustrated.
An autonomically managed system consists of the originally unmanaged target system and an autonomic manager (which itself comprises system adapters and the GAMF). All system adapters are registered in the GAMF’s system adapters registry. Amongst other features, this grants them permission to access the GAMF’s shared knowledge database in which events and metric values are stored.
System adapters provide operations that correspond to a specific phase of the autonomic control cycle. Their execution (metric extraction and policy evaluation) are triggered by the GAMF, as configured by a system adapter developer (for instance, periodically or at the occurrence/arrival of a specific event). The information about how a specific system adapter is triggered is held in the system adapters registry along with rudimentary access permissions to the shared knowledge database. Access to any data stored in the shared knowledge data base is concurrency-safe. The following types of system adapters are defined:
GAMF includes a flexible mechanism to filter for specific events or metrics in the shared knowledge database. Filter options include filtering for events or metrics of a specific type, and metrics or events recorded within a specific time window. To allow reuse of system adapters or simply to organise them, a system adapter can be categorised as being used for managing a specific facet of the target system. Additionally different options are provided to control when metric extractors and policy evaluators are triggered:
[overview] [features] [system architecture] [getting started] [examples] [downloads] [API]
import gamf.framework.GenericAutonomicManagerFramework; import gamf.interfaces.framework.IGAMF;and create an instance of the gamf.
IGAMF gamf = new GenericAutonomicManagerFramework();Specify a facet of the target system you'd like to manage in an autonomic manner. System adapters are associated with this facet at a later stage. Import the facet Interface.
import gamf.interfaces.framework.IManagedFacet;Create the facet.
IManagedFacet managedFacet=gamf.registerManagedFacet("my facet");
import gamf.interfaces.systemAdapter.*and implement the envisioned functionality. Abstract system adapters which implement fundamental operations are provided in:
gamf.addons.apstractSystemAdapter;By extending these fundamental system adapters you don't need to re-implement standard functionality. The example(s) provided in the download section use these abstract system adapters. Download the source to modify them or to use them as example. Any system adapter needs to be associated with a specific aspect when being registered with the gamf. In the case of an event generator, this can be achieved as outlined here:
// create your event generator IEventGenerator myEventGenerator = new MyEventGenerator(); // register your event generator with the GAMF gamf.add(myEventGenerator, managedFacet);If the system adapter under consideration is a metric extractor or policy evaluator you can specify how it shall be triggered. For instance periodically, by specifying the interval between triggering operations.
IPolicyEvaluator myPolicyEvaluator = new MyPolicyEvaluator(); int evaluationInterval=1000;//in ms gamf.add(myPolicyEvaluator, evaluationInterval, managedFacet);For more options, please see the API or the provided example(s).
[overview] [features] [system architecture] [getting started] [examples] [downloads] [API]
A complete Java example of the following use case can be found in the [downloads] section of this webpage. When considering a use case in which an autonomic manager is added to a target system for which the source is available or if a system is built with an autonomic management form start, the GAMF can be used in the following way. A simplified use case is considered in which an application's sensor component is the target system. This component periodically gathers environmental monitoring data which is then processed. It is assumed that the data is gathered from remote sensor nodes which are also used by another application. A low interval may cause heavy usage of the sensor nodes and subsequent processing errors. Therefore it is required that the interval is increased if the error rate of increases and decreases with the rate of errors again as the amount of data gathered should be as large as possibly without jeopardising the application's correctness. An autonomic manager (based on the GAMF) is described here which adapts the data gathering interval following these requirements. As the GAMF is currently only available in Java, it is assumed that the target system is written in Java as well.
The autonomic manager consists of the GAMF and the following system adapters:
An event generator is added to the target system in order to report error-events (specified with an error-event-type) when carrying out a specific operation which relies on sensing data. An effector, is added to the target system in order to change the polling interval.
A metric evaluator is created to analyse the situation with respect to recently monitored errors. This is done by counting the number of error-event-type events reported since the last analysis (This are events stored in the GAMF's shared knowledge data base, with the corresponding event type and time-stamp.). A policy evaluator is created to determine a new polling interval if the error number is greater than a specific threshold. The policy evaluation is executed periodically and triggers the metric analysis.
When considering a use case in which an autonomic manager is added to a target system for which the source is NOT available the GAMF can be used in the following way. Here the objective of the manager is to control the resource allocation of a specific web site autonomically in order to maintain free resources for other websites on the same host in the case that the website under consideration exhibits a high access rate.
The target system in this case is a web server, whose source code is not available. The web server's configuration files and the log files allow read and write access. GAMF runs in a separate address space but on the same physical machine as the web server. The website consists of an application which carries out resource consuming computations. If the number of accesses to the application per observation period exceeds a specific threshold, the configuration setting for the number of web server child processes is reduced in order to allow other services on the web server to use enough CPU.
A log file watcher which implements an event generator is developed. This log file watcher periodically searches for events in the web server's access log file which indicate that the website was accessed. The event generator sends the number of accesses as an event to the GAMF. An effector is implemented which changes the maximum number of child processes for the website under consideration in the web server configuration. After a successful change of the number of child processes, the effector restarts the web server so that the configuration change has an effect.
[overview] [features] [system architecture] [getting started] [examples] [downloads] [API]
sensorComponent.MyTargetSystem::processData : simulating error gamf.addons.apstractSystemAdapter.EventGenerator::publish : ERROR_EVENT published java.lang.Exception: simulating error at sensorComponent.MyTargetSystem.processData(MyTargetSystem.java:115) at sensorComponent.MyTargetSystem.run(MyTargetSystem.java:80) sensorComponent.MySensorComponentPolicyEvaluator::evaluatePolicy : chaning polling interval from:1000 to 1001 sensorComponent.MyTargetSystem::processData : simulating error java.lang.Exception: simulating error at sensorComponent.MyTargetSystem.processData(MyTargetSystem.java:115) at sensorComponent.MyTargetSystem.run(MyTargetSystem.java:80) gamf.addons.apstractSystemAdapter.EventGenerator::publish : ERROR_EVENT published sensorComponent.MySensorComponentPolicyEvaluator::evaluatePolicy : chaning polling interval from:1001 to 1002 sensorComponent.MySensorComponentPolicyEvaluator::evaluatePolicy : chaning polling interval from:1002 to 1001 sensorComponent.MySensorComponentPolicyEvaluator::evaluatePolicy : chaning polling interval from:1001 to 1000 sensorComponent.MySensorComponentPolicyEvaluator::evaluatePolicy : chaning polling interval from:1000 to 999
Alternatively, if you are not interested in the gamf and nds source code, you can use the provided gamf.jar file. Delete the dependencies in the gamf_example project proprieties (right click on the project name in eclipse), download the gamf.jar file and add it to the gamf_examples project's build path as external jar file.
Any of the above steps for compiling the example also applies if you plan to use the GAMF to build an autonomic manager for the system of your choice: Add either the gamf.jar file or the gamf and nds project to the build path of your autonomic manager and use it as illustrated in the examples.
GAMF was written using Java version 1.6. Above steps were tested in eclipse, version: 3.5.1.