Abstract
Verifying distributed systems is notoriously difficult because they involve multiple processes, asynchronous networking, and complex concurrency. This paper introduces an improved "centralization" technique that merges a multi-process distributed application into a single-process one, allowing developers to use standard single-process tools (like debuggers and model checkers) on the entire system at once. The core innovation is a "Version Separation" algorithm that resolves class version conflicts—allowing different components to use different versions of the same library within a single JVM—while maximizing code sharing to keep the system efficient.
Introduction
When analyzing a distributed system, developers typically manage multiple Virtual Machines (VMs) communicating over a network. This architecture makes it nearly impossible to use powerful single-process tools like Java PathFinder (JPF) or standard interactive debuggers to obtain a "global" view of the system.
Centralization solves this by wrapping each process as a thread and running them all within a single VM. As shown in the figure below, this transforms inter-process communication into inter-thread communication, enabling a unified analysis environment.
However, a major roadblock exists: Version Conflicts. In a real-world distributed system, a "Client" might use version 1.0 of a library, while the "Server" uses version 2.0. Because a standard JVM cannot load two different classes with the same name, a naive merge of these processes will crash or behave incorrectly.
Methodology: Version Separation and Resource Isolation
The authors propose a formal framework for Project Centralization and introduce two algorithms to handle versioning. The primary contribution is the Optimized Algorithm, which utilizes a Partition Graph (P-graph).
In the P-graph, nodes represent class names and edges represent dependencies. Instead of renaming every class, the algorithm groups projects into "partitions" that can safely share the same class version. It identifies "conflict edges" where a dependency would force a version mismatch and resolves them by refining the partitions. This minimizes the number of new classes created, saving memory and storage. The following figure illustrates how multiple projects with conflicting class definitions are transformed into a single, conflict-free centralized structure.
Beyond renaming, the authors implemented:
- Static Field Transformation: Static fields are transformed into arrays, where each element corresponds to a specific process ID. This emulates process-level memory isolation within a single VM.
- Lifecycle Management: Network functions are instrumented so that client threads automatically wait for server ports to become active, mimicking real-world network dependencies.
Evaluation and Results
The tool was evaluated using several open-source Java network libraries (e.g., Edtftpj, Jsmpp, Kryonet) and application benchmarks like Echo, Chat, and Alphabet.
Key results include:
- Reduced Overhead: Centralized applications ran faster and used less memory than multi-process counterparts by avoiding the overhead of launching multiple JVMs.
- Optimized Renaming: The P-graph algorithm significantly outperformed simple renaming. In a test with 14 project instances, the optimized algorithm kept storage size constant (632 KB), while the simple algorithm's output ballooned to over 2000 KB.
- Bug Discovery: Using the tool with JPF, the authors successfully detected a race condition in a Chat server and a formatting bug in a "Leap Second" scenario—bugs that are notoriously difficult to find using traditional testing.
Conclusion
Centralization effectively turns network communication into inter-thread communication, making distributed systems compatible with standard JVM tools. While the current implementation does not support Java Reflection and faces challenges in simulating hard process crashes, it provides a significant step forward in global determinism for distributed system verification. Future work will focus on refining thread termination and addressing the underlying state space explosion problem.
Summary updated