SDLE Assignment of group T07G14.
Group members:
- Bruno Machado ([email protected])
- João Padrão ([email protected])
- José Francisco Veiga ([email protected])
- This project, entitled Shopping Lists on the Cloud, centres on the implementation of a distributed system that uses conflict-free replicated data types (CRDTs) to guarantee consistency between replicas in a shopping list management application. The application allows users to create, share and manage shopping lists collaboratively, even in offline-first scenarios.
-
CRDT implementation: Use of CCounters to manage item quantities in a conflict-free way.
-
Distributed architecture: Based on ZeroMQ for robust communication between clients and servers, employing the Paranoid Pirate Pattern to increase fault tolerance. The server is composed of a broker and multiple workers. The broker is responsible for load balancing the clients' requests among the workers, which are responsible for processing them.
-
Persistence and replication: MongoDB is used to persist data on the server side, guaranteeing durability and allowing recovery after failures.
-
Objective: To demonstrate the viability of cloud-supported, conflict-free collaborative applications with minimal friction for the user.
Below are the instructions to build and run the project. This is mainly focused on Ubuntu, but the links below also provide instructions for other operating systems.
To build and run the project, ensure the following software is installed:
-
CMake (version 3.30 or higher): you can download and install CMake from the official website.
-
MongoDB: Follow the instructions on the official website, here is a guide to install it on Ubuntu.
-
MongoDB C++ Driver (mongocxx and bsoncxx): here is a guide to install it on Ubuntu. Make sure to install it with the Boost polyfill option.
-
Clone the repository and navigate to the project directory:
git clone <repository_url> cd g14
-
Init the submodules:
git submodule update --init --recursive
-
Build the project using CMake:
cmake -S . -B build cmake --build build
-
Start the MongoDB server:
sudo systemctl start mongod
-
Run the broker:
cd build ./main_broker
-
Run the workers:
./main_worker
-
Run the client:
./client