- Introduction
- System Requirements
- Setup and Installation
- Client Server Communication
- Architecture
- Running the Application
- Testing
This project implements a simple client-server system that performs a parallel Breadth-First Search (BFS) operation on a graph. The graph information is sent by the client to the server which performs the BFS operation in a parallelized manner using Python's multiprocessing capabilities.
- Python 3.6 or higher
- Networking permissions for the Python interpreter to open sockets
- Clone this repository or download the project zip.
- Extract the files to your desired location.
- Run the Python scripts as described in the "Running the Application" section.
The client prompts the user to enter a graph and sends this to the server. The server performs a parallel BFS on the received graph and returns the order of visited nodes back to the client.
The application consists of two main Python scripts:
-
client.py
: Sends the graph data as a JSON object to the server using a socket. -
server.py
: Receives the graph data, performs a parallel BFS using Python's multiprocessing module and returns the list of visited nodes back to the client.
To run the server, ensure that server.py
is in your current directory and run the following command in your terminal:
python3 server.py
To run the client, ensure that client.py
is in your current directory and run the following command in your terminal:
python3 client.py
When prompted, enter the graph information in the following format:
{'1': ['2', '3'], '2': ['4', '5'], '3': [], '4': [], '5': [], 'start': '1'}
Unit tests are included in the tests.py
file.
To run the tests, navigate to the directory containing tests.py
in your terminal/command prompt and use the command:
python3 -m unittest tests.py
This project is licensed under the MIT License - see the LICENSE.md
file for details.
This project was created as part of the "Network Programming" course at the Faculty of Mathematics and Informatics (FMI), Sofia University, 2023.
For queries or assistance, please feel free to reach out.