Inferring Meta-models for Runtime System Data from the Clients of Management APIs

Hui Song, Gang Huang, Yingfei Xiong, Franck Chauvel, Yanchun Sun, Hong MeiMoDELS 2010 · DOI

TL;DR

This paper introduces an automated approach to infer meta-models for runtime system data by analyzing client code that interacts with management APIs. This is crucial for building model-driven runtime monitoring systems, as it eliminates the manual effort traditionally required to define these meta-models.

What Problem Does This Paper Address?

Monitoring running software systems generates a wealth of runtime data (e.g., memory usage, component status). To effectively manage and analyze this data, a "runtime model" is desirable, which represents this data explicitly. However, creating these runtime models requires a meta-model that defines the types of data and their relationships. Traditionally, users had to manually create these meta-models, which is a tedious and error-prone process, especially since management APIs often lack clear documentation or standardized data types. This paper addresses the challenge of automatically generating these essential meta-models.

Methods

The core of the paper's contribution lies in its novel static code analysis approach. The authors model the client source code as a Data Transition Graph (DTG), where nodes represent data and edges represent operations that transform data. They then analyze these DTGs to identify "API involved transitions" (operations that interact with management APIs).

The process involves:

  1. Extracting Data Transition Graphs (DTGs): Source code is transformed into DTGs, capturing data flow and API interactions.
  2. Analyzing Valid Sub-DTGs (VSDs): For each API involved transition, the algorithm identifies all possible "slices" of the DTG that lead to that transition. These VSDs represent distinct ways the API access can be "fed" with data.
  3. Inferring Raw Meta-Models: Each VSD is used to infer classes and associations. A VSD ending in an API access is mapped to a class, and direct "feeders" (API accesses that directly provide data) within the VSD are mapped to associations between classes.
  4. Simplifying the Raw Meta-Model: A set of five rules (e.g., merging equivalent references, removing forwarding classes, weakening leaf classes to attributes) are applied iteratively to refine the raw meta-model, making it more concise and accurate.

Datasets

The paper uses several real-world systems for evaluation, including:

  • Glassfish: A JEE server, used as the motivating example.
  • JOnAS: Another JEE server, with both an official sample client and its web-based administration console used.
  • Equinox OSGi: The Eclipse console is used to model bundle information.
  • BCEL: A Java bytecode manipulation library, used to model Java class structure.
  • DOM Axis Admin: Used to model web service deployment descriptors.

The paper does not introduce new benchmark datasets but rather applies its approach to existing systems and their associated client code.

Key Insights and Ideas

  • Client code as a knowledge source: Developers' understanding of system data and its usage is implicitly encoded in API client code. By analyzing this code, we can reverse-engineer this knowledge.
  • Data Transition Graphs (DTGs) as a powerful abstraction: DTGs effectively capture the flow of data and API interactions, providing a structured representation for analysis.
  • Valid Sub-DTGs (VSDs) reveal data feeding patterns: Identifying VSDs allows the system to understand the different ways API accesses are invoked and the data they depend on, which is key to inferring relationships.
  • Meta-model simplification is crucial: Raw meta-models can be noisy and redundant. The proposed simplification rules are essential for producing usable and concise meta-models.
  • Client purpose matters: The quality of the inferred meta-model is influenced by the client's primary function. Clients focused on representing system data yield better results.

Key Results

The paper demonstrates the effectiveness of its approach through experiments on various systems.

  • Accuracy: The inferred meta-models generally show high accuracy, with more than 80% of inferred data types correctly defining system data. For clients primarily focused on data representation, accuracy is even higher.
  • Efficiency: Efficiency scores are generally good but not ideal, with some duplication of data types observed when clients use different methods to access the same data.
  • Time: The analysis process is efficient, taking between 2 to 20 seconds for the experiments, which is considered tolerable for a one-time analysis per system.
  • Qualitative results: The generated meta-models are shown to be useful for upgrading existing runtime models and are comparable to manually created or reference meta-models.

Limitations and Future Work

  • Client dependency: The quality of the inferred meta-model is heavily dependent on the input client code. Clients with mixed functionalities (not solely data representation) or those that access data in highly varied ways can lead to incorrect or redundant inferences.
  • Incomplete coverage: The inferred meta-models only cover the data accessible through the analyzed API clients, not the entire system's data.
  • Future Work: The authors plan to improve the approach by:
  • Precisely classifying API access operations.
  • Developing more effective techniques for identifying and merging duplicated data types.
  • Investigating methods to automatically extract how to access each type of data by further slicing client code based on the meta-model.

Summary updated

BibTeX
@inproceedings{song2010inferring,
  author = {Hui Song and Gang Huang and Yingfei Xiong and Franck Chauvel and Yanchun Sun and Hong Mei},
  title = {{Inferring Meta-models for Runtime System Data from the Clients of Management APIs}},
  booktitle = {MoDELS},
  year = {2010},
  doi = {10.1007/978-3-642-16129-2\_13},
}

Loading related content...

Figure