Distributed Systems course assignment to synchronize the server clock with the client using Christian's algorithm.
The Demo run the server in a Linux Mint laptop using python3 and the client in a Windows 10 desktop using nodejs. Video demo made in Canva.
git clone https://github.com/Flavio-Ore/Clock-Synchronization.git
cd .Clock-SynchronizationTip
It is recommended to run the server on a different machine but on the same LAN.
It is necessary to have the 3.11.X version of Python installed.
We proceed to enter the folder and run the server clock.
cd .server
python3 main.pyDepending on the client you want to use.
The python client will display the results in the console.
The nodejs client creates an http server and will serve an index.html page that consumes the API that communicates with the clock python server.
You need to have v20.X.X.X version of Nodejs and 10.X.X version of npm installed.
cd .\client NodejsInstall the dependencies with npm i.
To run the client server
node --watch .\server.cjsYou need to have Python version 3.11.X and pip version 24.X.X.X installed.
This module requires to raise a virtual environment.
cd .\client\python\
py -m venv venv
# Activate the venv
.\venv\Scripts\activate
(venv) pip install python-dateutil
(venv) python main.py