this is an assignment for my university
STATUS: Work In Progress
For this project to be setup and run you should have:
download a mysql database like Mysql MariaDB .
download a gcc compiler to compile provided code with provided shell script
download the mysql library to staticly link it with the ServeurTCP binary
clone the repository locally and cd into it with the following commands:
git clone https://github.com/Mehdibenhadjkhelifa/Distributed-Systems-Project.git
cd Distributed-Systems-Projectyou need download all dependencies listed above
OR
if you are in a ubuntu system run:
scripts/ubuntuSetup.shthis is achieved by the following comands:
sudo mysql
-- for MySQL
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
-- for MariaDB
ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('root');Use the provided file in SqlHelpers named setup.sql entering the following command :
mysql < SqlHelpers/setup.sql -u root -pwhen prompted for the password enter root as setup in step a
this command will setup your mysql server with a database named VehiculeDB
and a table named Invoices have examples of invoices.
OR
you can set it up manually using sql commands but NOTE that the name
of the database and the table should match what is noted above.
You can use the data.sql file provided in SqlHelpers and modify it to add additional raws in the database .
After adding elements execute:
mysql < SqlHelpers/data.sql -u root -pSame as last step enter root as your password.
OR
you can add individual elements manually and NOTE to match the name of the table.
you can build the whole project with :
scripts/build.shthis will generate 4 binaries under the bin folder to use :
1- ClientTCP which is the client's binaries
2- ClientServeur which is the proxy
3- ServeurTCP which is the Vehicules serveur
4- ServeurUDP which is the parapharmaceutical serveur
OR
you can compile the binaries with a compiler of your choice but note that
the proxy have the following source files: ClientServeur.c ClientServeurUtils.c
And link the vehicule serveur ServeurTCP with mysqlclient.
you should execute the 4 provided binaries in a seperate processes and only use the Client
pocesse to use the app where you can:
NOTE: To view more details about the project,check the provided pdf file(STILL NOT PROVIDED).