Using Service Dependency Graph to Analyze and Test Microservices

Authors:
  • SMShang-Pin Ma
    Shang-Pin Ma
  • CFChen-Yuan Fan
    Chen-Yuan Fan
  • YCYen Chuang
    Yen Chuang
  • WLWen-Tin Lee
    Wen-Tin Lee
  • SLShin-Jie Lee
    Shin-Jie Lee
  • NHNien-Lin Hsueh
    Nien-Lin Hsueh

Abstract
Microservice architecture (MSA) is an emerging software architectural style, which differs fundamentally from the monolithic, layered architecture. MSA is based on microservices to provide several advantages, such as autonomy, composability, scalability, and fault-tolerance. However, how to manage complex "call" relationships between microservices is still a big issue that needs to be addressed. In this paper, we propose an approach for assisting the development of MSA-based systems, referred to as GMAT (Graph-based Microservice Analysis and Testing). GMAT can automatically generate "Service Dependency Graph (SDG)" to analyze and visualize the dependency relationships between microservices. Using GMAT, people are able to detect anomalies by analyzing risky service invocation chains in early stage of development, and trace the linkages between services when developing a new version of a target system. Experiments show that GMAT is able to work well for both small-scale and large-scale MSA-based systems.