Identifying operation commutativity in the Context of Replicated Systems - Vaz, Rúben Alexandre Correia (2023)
Distributed systems often resort to data replication not only to enhance their availability but also to reduce user-perceived latency by balancing the load between replicas and routing their requests accordingly. Several systems resort to strong consistency to ensure high availability, although some systems are not allowed to weaken their consistency model. Recognizing the tension between consistency and high availability, many systems allow multiple consistency levels to coexist. However, most of those systems require that the programmer explicitly specifies each operation’s consistency level or declare the operation’s invariants and side effects. Reasoning about the system’s correctness becomes more challenging as the code scales. For instance, a single missing side effect identification may silently adulterate the application’s behavior. As part of the DeDuCe research project, this work aims to reduce the programmer’s effort by only requiring the programmer to introduce a simple and intuitive input at data declaration. Following this approach, the reasoning is centralized, and all accesses to replicated data are identified automatically. By identifying which operations access to replicated data, these operations are analyzed for commutativity, and conflict relations are defined for each operations pair. Conflict-free operations will be refactored to a commutative version capable of executing without global coordination. In this context, this thesis focuses on extending compile-time commutativity analysis applied to the Java language able to compute operation pairwise commutativity from the input given at data declaration. In addition, to extend commutativity analysis to objects, we specify which are the conditions that guarantee commutativity for an operations pair. We conclude our work by evaluating correctness and scalability. We show the correctness of the effects extraction and the produced outputs of each stage of the analysis. We analyze the time distribution in the inner stages of the analysis, and we seek to comprehend how the compile time scales when the size of the source code increases. Finally, we quantify the time required to determine if two method calls commute.