XMLGoDIETGenerator

XMLGoDIETGenerator is a Java application that builds from a compact descriptor file and a reservation directory a GoDiet XML file you can use to deploy a DIET platform with GoDIET.

XMLGoDIETGenerator relies on a small set of information in order to be as simple as possible to use. Moreover the information are near the ones used in the GoDIET XML file in order to be understandable for the developers that write their one GoDIET XML files.

This application fills the lack of a XMLGenerator for large experiences that need large XML file for GoDIET, a lack of a generator that could be flexible by offering the user a certain number of predefined hierarchies if none were satisfying. The possibility of creating its own hierarchy by implementing its own Hierarchy class.

Finally one can consider the fact that for large experiments, writing the GoDIET file by hand is time consuming. And if the user should redo this experiment with a different set of machines, or cluster, the modifications that should be done on the GoDIET file can be reduce with XMLGoDIETGenerator as far as the file will be generated according to the available resources.

XMLGoDIETGenerator is a stand-alone application you can use from the command line for an easy creation of a XML GoDIET input file. But it can also be used from the DIET Dashboard through a nice GUI interface helping the user in creating the GoDIET file with or without keeping the input file of the XMLGoDIETGenerator.

As far as the XMLGoDIETGenerator is a Java-based application it requires a Java Standard Development Toolkit and the apache ant software for the compilation from the source files. If you just want to run it you need at least a Java Runtime Environment. but both should be of version 1.4.2 or higher.

Application process

The application process is the following:

  • The user provide a XML input file containing the name of the experience to launch, where the application will find the reservation directory, where it will create the output file and the description of the elements needed for the construction of the GoDIET XML file
  • The application will read the input file, parse it, create the needed elements and gather the resources from th reservation directory
  • The experience will be constructed from this information and the GoDiet XML file will be written.

The global scheme of the application is the following:

Global Scheme for XMLGoDIETGenerator

Reservation directory

The reservation directory contains the information concerning the resources available for the experiment. The directory should contain the files that listed the nodes for each cluster (one file per cluster name clusterName.machines). The name of theses files must match the effective names of the clusters.

Input file

To create the GoDIET XML file the XMLGoDietGenerator needs an input file describing the mandatory information needed to construct the experience. This input file contains five parts:

  • One is concerning the experience:
    • GoDietExperience describes the experience chosen, the name of the output file and the reservation directory
  • Four are mapping the GoDIET input file:
    • GoDIET
    • resources declaring the clusters and storages
    • diet_services identifying the services
    • diet_hierarchy describing the elements of the hierarchy

For more informations about each elements of the input file, please take a look at the full documentated input file given in the examples directory of the distribution.

Experience Management inside XMLGoDietGenerator

To generate a file that could be processed by GoDIET, the user should use an Experience that describe the hierarchy he/she wants to apply to his/her platform. But the user can have specific needs, and the predefined experiences could not be what he/she expects. In XMLGoDietGenerator the management is realized at the execution and the available experiences are created dynamically. The reflexion and introspection APIs of the Java core allows the code to search for new classes, to load them and then to use them as if it were loaded as classical classes known by the code from the beginning.

This possibility allows the user to create his/her own experiences very easily.

N.B. : One should remark that the class should be compiled before the user loads it. Including the source file of the experience in the experiences package allows its loading.

Experience Management -- Java code

The experience defined by the user should inherit the abstract class experiences.Experience and implements two methods:

/**
 * Generates the Hierarchy of the DietConfiguration
 *
 */
abstract protected void generateDietConfigurationHierarchy();
/**
 * Prints out the informations on this experience
 */
abstract public void printInformation();
/**
 * Returns the range of SeD Types
 *
 * @return the range of set types [minimum, maximum]
 */
public abstract int[] getSeDTypeRange();

The first one will generate the hierarchy defined in the class, the second one will summarize the behavior of the experience, the last will return an array of two integers giving back the minimum and maximum numbers of SeD types that should be defined for the experience.

The experience could then be found by the XMLGoDietGenerator and the behavior it defines could be applied.