An open API service indexing awesome lists of open source software.

https://github.com/kikoveiga/feup-sdle

Large Scale Distributed Systems (SDLE) Project (2024/2025): MSc in Informatics and Computing Engineering @ FEUP
https://github.com/kikoveiga/feup-sdle

broker distributed-systems feup feup-meic feup-sdle mongodb polling worker-threads zeromq

Last synced: 3 months ago
JSON representation

Large Scale Distributed Systems (SDLE) Project (2024/2025): MSc in Informatics and Computing Engineering @ FEUP

Awesome Lists containing this project

README

        

# SDLE Assignment

SDLE Assignment of group T07G14.

Group members:

1. Bruno Machado ([email protected])
2. João Padrão ([email protected])
3. José Francisco Veiga ([email protected])

### [Video demo](https://www.youtube.com/watch?v=sn-efuW2-5E)

## Introduction

- This project, entitled **Shopping Lists on the Cloud**, centres on the implementation of a distributed system that uses conflict-free replicated data types ([CRDTs](https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type)) 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.

## Main Features

- **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](https://zguide.zeromq.org/docs/chapter4/) 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.

## Execution

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.

### Prerequisites

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](https://cmake.org/download/).

- **MongoDB**: Follow the instructions on the official website, [here](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/) is a guide to install it on Ubuntu.

- **MongoDB C++ Driver** (mongocxx and bsoncxx): [here](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/installation/linux/) is a guide to install it on Ubuntu. Make sure to install it with the Boost polyfill option.

### Build Instructions

- Clone the repository and navigate to the project directory:

```bash
git clone
cd g14
```

- Init the submodules:

```bash
git submodule update --init --recursive
```

- Build the project using CMake:

```bash
cmake -S . -B build
cmake --build build
```

### Run Instructions

- Start the MongoDB server:

```bash
sudo systemctl start mongod
```

- Run the broker:

```bash
cd build
./main_broker
```

- Run the workers:

```bash
./main_worker
```

- Run the client:

```bash
./client
```