This is a simple Client-Server application based on Python 3 socket .
- You can send any number from 0 to maxInt, and find the prime number of this number
This application uses Socket library from stantard python library
Server-Client requires Python v3.5+ to run.
Download archive and unpack it.
$ cd Server-Client
Primarily launch server application with default parameters
$ cd server
$ python -u server_app.py
It is default host ip and port, if necessary you can change it.
After them, you can launch client application parameters:
$ cd client
$ python -u client_app.py
If you need change host ip and port, you can add parameters, when you server and client
After launching a client, you must see this strings:
$ Please, enter number for factorization
$ For exit program, enter 'exit'
Enter number from 2 to python integer maxsize:
$ 300
$ [2, 2, 3, 5, 5]
In order to close the application, you need enter exit command in you client apllication
$ exit
$ Application was closed
After closure application, you need laucnh server and client application every time.
This application is very easy to install and deploy in a Docker container.
All you need build and launch prepared containers Also you can change default ip and port by the editing docker-compose.yml
cd Server-Client
cd Docker-Version
Build containers
docker-compose --build server
docker-compose --build client
This will create the server and client image's and pull in the necessary dependencies.
Once done, run the Docker image's , in different console windows
Server
docker-compose --run server
Client
docker-compose --run client
In docker version of application, you need enter exit in quotation marks
"exit"