Skip to content

Tuplespace manager using a Distributed System managed by gRPC and Java

Notifications You must be signed in to change notification settings

Dageus/Tuplespace-DS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TupleSpaces

Distributed Systems Project 2024

Team Members

(fill the table below with the team members, and then delete this line)

Number Name User Email
1103808 João Miguel Nogueira https://github.com/Dageus mailto:joao.miguel.nogueira@tecnico.ulisboa.pt
1103465 João Rocha https://github.com/jonhspyro mailto:joaonolascorocha@tecnico.ulisboa.pt
1103809 Rodrigo Ganância https://github.com/RodrigoGanancia mailto:rodrigo.ganancia@tecnico.ulisboa.pt

Getting Started

The overall system is made up of several modules. The different types of servers are located in ServerX (where X denotes stage 1, 2 or 3). The clients is in Client. The definition of messages and services is in Contract. The future naming server is in NamingServer.

See the Project Statement for a complete domain and system description.

Prerequisites

The Project is configured with Java 17 (which is only compatible with Maven >= 3.8), but if you want to use Java 11 you can too -- just downgrade the version in the POMs.

To confirm that you have them installed and which versions they are, run in the terminal:

javac -version
mvn -version

Before executing:

Create a virtual environment and activate it:

python -m venv .venv
source .venv/bin/activate

Install grpcio and grpcio-tools packages:

python -m pip install grpcio
python -m pip install grpcio-tools

If you wish to deactivate the virtual environment, run in terminal:

deactivate

Installation and compilation

To compile and install all modules:

Contract:

mvn clean install
mvn exec:exec

NameServer:

python server.py

Sequencer:

mvn compile

Server:

mvn compile

Client:

mvn compile

How to run project after compiling

NameServer Directory

python server.py

Sequencer Directory

mvn exec:java

Server Directory

mvn exec:java -Dexec.args="<host> <port> <qualificador> <serivco>" [-Ddebug]

Example:

Terminal 1:

mvn exec:java -Dexec.args="localhost 2001 A TupleSpacesTotalOrder"

Terminal 2:

mvn exec:java -Dexec.args="localhost 2002 B TupleSpacesTotalOrder"

Terminal 3:

mvn exec:java -Dexec.args="localhost 2003 C TupleSpacesXuTotalOrder"

Client directory

The Name Server automatically provides the client's ID.

 mvn exec:java -Dexec.args="<NS_host> <NS_port> <qualificador> <service>" [-Debug]

Example:

mvn exec:java

Run extra tests

Extra tests for synchronization purposes in sync_tests directory where multiple clients try requesting at the same time

1. Execute Name Server

2. Execute Servers

3. Run in 'tests/TotalOrder' directory the following command

./run_tests.sh

Built With

  • Maven - Build and dependency management tool;
  • gRPC - RPC framework.

About

Tuplespace manager using a Distributed System managed by gRPC and Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published