NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Feature Dataset of Microservices-Based Systems

Weipan Yang, Bingyu Song, Yongchao Xing, Yiming Lyu, Huihui Cui, Zhihao Liang, Zhiying Tu

TL;DR

This paper introduces a new open-source feature dataset specifically designed for microservices-based systems using the Spring Cloud framework. By extracting 23 architectural metrics from 55 mature GitHub projects, the authors provide a foundational resource for researchers to apply machine learning and heuristic algorithms to the detection of "microservice bad smells."

What Problem Does This Paper Address?

As the software industry shifts from monolithic architectures to microservices, developers often fall into traps of poor design—known as microservice bad smells (e.g., a "Nano Service" that is too small to be useful or a "Shared Database" that creates tight coupling).

While researchers have defined what these bad smells look like, there is a significant bottleneck: a lack of high-quality, labeled data. Most existing studies focus on defining metrics but lack the empirical datasets needed to train automated detection tools. Without a standardized dataset, it is nearly impossible to compare the effectiveness of different detection algorithms or to use modern machine learning techniques to identify architectural flaws at scale.

Methods

The authors developed a multi-stage pipeline to bridge this data gap:

  1. System Selection: They filtered over 5,500 GitHub projects down to 55 "mature" systems. Criteria included having at least four microservices, utilizing service discovery mechanisms, and maintaining multiple stable versions.
  2. Metric Establishment: They defined 23 metrics based on the standard Spring Boot three-tier architecture (Presentation, Business Logic, and Data Access layers).
  3. Direct Metrics (14): Extracted directly from code (e.g., number of controllers, entities, or API endpoints).
  4. Derived Metrics (9): Calculated from direct metrics (e.g., the ratio of attributes to entity classes).
  5. Automated Extraction: They built a custom tool using JavaParser, JGit, and Maven-Model. A particularly clever feature is their recursive URL extraction; since microservices often call each other using variables or method calls rather than hardcoded strings, the tool recursively traces these calls to map the internal interaction network of the system.
  6. Manual Verification: To ensure the dataset's reliability, the authors manually cross-referenced the extracted data against the source code.

Datasets

The primary output is a newly introduced feature dataset containing 1,180 data points derived from 55 microservice systems.

  • Format: Provided as a .csv file.
  • Scope: Focuses exclusively on Java-based Spring Cloud systems, which represent a dominant portion of the microservices ecosystem.
  • Comparison: Unlike previous datasets that might only look at lines of code or simple dependencies, this dataset captures deep architectural features like service-to-service invocation frequencies and Data Transfer Object (DTO) counts.

Key Insights and Ideas

  • The Power-Law of Services: The data reveals that microservice metrics follow a power-law distribution. Most services are small and focused, but a few "outliers" (like the Apollo-Portal) are massive and intricate. This suggests that bad smell detection must account for "hubs" in the architecture.
  • The "Naming Convention" Trap: The authors found that automated tools often fail when developers use non-standard naming (e.g., naming a package entitys instead of entity). This highlights why manual verification remains a critical step in dataset creation.
  • The Evolution of Communication: The study noted that as systems migrate from RestTemplate to the newer WebClient, static analysis becomes harder. This identifies a moving target for future extraction tools.

Key Results

The extraction program proved highly accurate across most systems. Manual verification showed:

  • 100% Accuracy for metrics like controllerNum, interfaceNum, and abstractClassNum across almost all tested systems.
  • Lower Accuracy in Edge Cases: In the gpmall system, entityNum accuracy dropped to 30% because of non-standard package naming, which the authors subsequently corrected manually.
  • Interaction Mapping: The tool successfully mapped complex service-to-service calls (SCD/SCS metrics) with high reliability, achieving over 90% accuracy even in large systems like mall4cloud.

Limitations and Future Work

The authors acknowledge several constraints:

  • Ecosystem Bias: The dataset is limited to Spring Cloud and Java. It may not represent microservices built in Go, Python, or those using service meshes like Istio.
  • Scale: While the projects are "mature" by open-source standards, they may not reach the astronomical scale of "Big Tech" industrial systems (e.g., Netflix or Amazon).
  • NoSQL Gap: The current extraction logic does not account for entity classes used in NoSQL databases.

Future Work: The team plans to expand the catalog, improve the extraction logic for modern libraries like WebClient, and—most importantly—begin labeling the dataset for specific bad smells to create a "gold standard" for machine learning training.

Summary updated

BibTeX
@inproceedings{yang2024feature,
  author = {Weipan Yang and Bingyu Song and Yongchao Xing and Yiming Lyu and Huihui Cui and Zhihao Liang and Zhiying Tu},
  title = {{A Feature Dataset of Microservices-Based Systems}},
  booktitle = {ICSS},
  year = {2024},
  url = {https://openreview.net/forum?id=cDVPyfElgf},
}

Loading related content...

Figure