GSoC Hackystat Weekly Update 12
August 11, 2009 No CommentsHi Everybody !
Overview
This blog entry is finally an interesting one. Remember to the overall picture:
The overall concept was described in my post of the GSoC Weekly Update 3 of the 8th of June . The only conceptual adoption is that there is always just one single agent for each service with monitoring and execution functionality.
As already mentioned in earlier posts, the basic framework was already implemented end of July. The basic system consists of a simple Graphical User Interface and the agents. The agents are SOA services implemented in REST, and are only capable of starting and stopping the services so far (Execution part of agents).
Last week I was able to finish the set up of the blue “CBR” component. I used the Jcolibri2 CBR framework for this. JColibri is accessing an embedded Apache Derby database in the Hackystat Service Manager. I set up some initial cases with the CBR features I created over the last weeks in the database. Now one can create a new CBR Problem description and send it to the JColibri framework which returns a set of cases that are similar to the CBR problem description.
The CBR component:
The documentation and introduction to JColibri can be found here: JCOLIBRi Documentation
1. First we have to set up an embedded Apache Derby database, with a table structure as follows:
create table case_base (caseId varchar(15), service varchar(50), reachable integer,
reqLatency real, adeqHeapsize integer, exceHeapSize integer,
dbLatency real, solutionCode integer
The table structure depends on the CBR features, which are extendable and the table structure can be changed at any time in my Java Class called CaseBaseInitializer. The same class allows to enter some initial cases into the database or, later, load an exported database for porting capabilities.
2. A class called CaseRecommender implements the StandardCBRAppication interface of the JColibri library. This is the core class that creates a connection the database via hibernate and maps the cases to objects. Therefore we have four XML configuration files in the directory of the application called:
- databaseconfig.xml
- hibernate.cfg.xml
- CaseSolution.hbm.xml
- CaseDescription.hbm.xml
For details on the concept and configuration files, look at the JColibri documentation.
3. The CaseRecommender class maps the columns of the Database (CBR-features) with Similiarity Functionalities.
That looks like this:
// First configure the NN scoring
NNConfig simConfig = new NNConfig();
//Set Global similarity function to average
simConfig.setDescriptionSimFunction(new Average());
//Create attributes for Mapping CBR features
Attribute service = new Attribute("service", CaseDescription.class);
Attribute reachable = new Attribute("reachable", CaseDescription.class);
Attribute reqLatency = new Attribute("reqLatency", CaseDescription.class);
Attribute adeqHeapsize = new Attribute("adeqHeapsize", CaseDescription.class);
Attribute exceHeapsize = new Attribute("exceHeapsize", CaseDescription.class);
Attribute dbLatency = new Attribute("dbLatency", CaseDescription.class);
//Set similarity function for each CBR feature
simConfig.addMapping(service, new Equal());
//simConfig.setWeight(service, 0.5);
simConfig.addMapping(reachable, new Equal());
simConfig.addMapping(reqLatency, new Interval(100));
simConfig.addMapping(adeqHeapsize, new Interval(4000));
simConfig.addMapping(exceHeapsize, new Interval(4000));
simConfig.addMapping(dbLatency, new Interval(100));
4. Now a new CaseDescription Object can be created and send to the CBR application to retrieve the most similar cases.
This is all working successfully, what it needs is some optimization and perfection of the CBR features and cases as well as the implementation of the monitoring and execution.
What work is left ?
In the next two weeks I will complete the system, by:
- implementing the monitoring functions for the CBR features described here: http://www.weitz.lu/cbrfeatures_draft.pdf
- creating the Analysis component, if some metrics show misbehavior the metrics are captured and send to the CBR JColibri framework
- creating the Plan component will adopt the solution of the most similar case and execute it. Retrieve the solution, Reuse the solution, Revise the solution, Retain the solution. The 4 major CBR steps.
- adding execution fucntionalities to the Agents for fixing the misbehavior appropriate to the case solution.


Sorry, the comment form is closed at this time.