Enrico Cornacchia
sommario
This report presents the design, implementation, and validation of a distributed, multi-warehouse inventory management system. Built to operate across a simulated Wide Area Network, the system uses a masterless, peer-to-peer architecture that prioritizes Availability and Partition Tolerance over strict consistency. The core objective is to ensure that local warehouse operators can continuously read and modify stock levels without blocking, even during severe network outages. The backend nodes are implemented in Go and communicate asynchronously via gRPC, utilizing embedded SQLite databases for serverless, lightweight data persistence. In order to guarantee eventual consistency and prevent data loss during split-brain scenarios, the system employs vector clocks for causality tracking and an additive state reconciliation protocol. The infrastructure is containerized using Docker and orchestrated via a local Kubernetes cluster (Minikube). Furthermore, Project Calico is integrated as the Container Network Interface (CNI) to enforce network policies, allowing for rigorous testing of simulated network partitions. The final system successfully demonstrates fault tolerance, automatic state recovery, and mathematical conflict resolution without relying on a central authoritative database.
prodotti