From ae9b072678515dfd590e2a03d0ab83644edd87b1 Mon Sep 17 00:00:00 2001 From: Mohamad Moussa <mohamad.moussa@hesge.ch> Date: Fri, 7 Jun 2024 14:19:36 +0200 Subject: [PATCH] Add README --- Local-Without-Pred/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Local-Without-Pred/README.md diff --git a/Local-Without-Pred/README.md b/Local-Without-Pred/README.md new file mode 100644 index 0000000..42ae029 --- /dev/null +++ b/Local-Without-Pred/README.md @@ -0,0 +1,28 @@ +# Lab : Distributed Algorithm - Message Passing + +## Overview +This project implements a distributed algorithm for communication between nodes in a network using **Sockets**. The code is designed to be containerised using Docker. + + +## Prerequisites +- Python 3.x +- Docker and Docker Compose + +## Description +Each node in the network has a configuration file that lists its neighbors. + +The exercise involves the following steps, [file](./sock.py): +1. Initalisation: + - Each node reads its neighbors file. + - Each node starts a server socket to listen for incoming connections +2. Message Exchange: + - During the first *x* iterations, each node sends a message of type REQUEST_WEIGHT to all its neighbors. + - Upon receiving a message of type REQUEST_WEIGHT, a node responds by sending back a message of type WEIGHTS to the requesting node. + - The algorithm runs for a total of *N* iterations + - Each node logs its activities and messages + +## Dockerfile +Once your code is developed, it is time to build the container image, [DockerFile](./Dockerfile) + + +## \ No newline at end of file -- GitLab