-
Install requirements
pip install -r requirements.txt
-
Run the command below to start the name server
pyro5-ns
If you are on windows and follow the steps above, when you run server.py
, you will get the following error:
AttributeError: module 'signal' has no attribute 'SIGALRM'
This is because the SIGALRM
attribute exists only for unix like systems. In this case, upload a docker
container and run the application, whose steps are below in "Setup environment with docker".
-
Build the
Dockerfile
imagedocker build -t <image_name> .
-
Create the container
docker run -it --name <container_name> -dp 80:80 <image_name>
-
Access the container terminal
docker exec -it <container_name> bash
-
Follow the steps of "usage" below, for the same container where the name server was started
-
Go to the correct directory
cd src
-
Start the server passing its name as an argument (
<server_name>
)python server.py <server_name>
-
Run the client by passing the same server name given
python client.py <server_name>