AI Agents and Static Scanning Can Map Monolith Dependencies Before a Service Split

Teams often choose the first microservice to extract based on intuition, only to discover later that it shares database tables with much of the codebase. The article argues for mapping dependencies first, with AI agents reading code to propose a dependency graph and a script verifying each edge. It distinguishes code edges, such as imports and calls between modules, from data edges, where several modules read or write the same table, and warns that the data edges are the ones teams most often overlook. The author presents a Python scanner that uses the ast module to collect imports and regex to find table names in SQL, then ranks modules by how difficult they would be to extract. The piece also cites research on AI-guided partitioning reporting better latency and throughput when database access is included in the graph.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in