Content
A final project in a communication and computing course
In this project we had to design a system of a primitive instant messaging, like whatsapp, messanger, etc., which based on communication. In addition, we had to append a file transferring layer above UDP, with CC (i.e. congestion control) and applying an RDT (i.e. reliable data transfer) protocol, such as: 'stop and wait', 'go back N', and so on...
This is a glance from above of the server's architecture.
In the server there exist a listening unit, which waits for user connections. In addition, there is also a client's service unit, which provides thread for each user that has just connected to the server. In this thread, the latter serves the client for some features the server provides. The methods which enable this client's treatment by the logic unit. In order to figure out what the client's message exactly says, the data analysis unit will analyze client's message following the protocol.
- For some more information about the protocol, click [here](put here a link)
This is a glance from above of the client's architecture.
The existed units for the client are similar to those of the server. There is an analyzing unit of server's updates and responses. Additionally, there is a logic unit which responsible for making queries that are corresponding to the commands arrived from the graphical interface (GUI). The logic unit uses methods to make the queries according to the client's interest, these queries will be analyzed in server's side, and the latter returns a corresponded response, following the protocol, back to the logic unit.
Here are the states diagrams of the sender (server in our case) and receiver (client in our case), for our implementation for sending and receiving files over Fast Reliable UDP via Go-Back-N protocol, and CC (Congestion Control) algorithm.
In addition, the CC algorithm we have implemented is very similar to reno algorithm.
Unified Modeling Language (UML) :
First, it's important to make sure you clone this project in Pycharm through Terminal. To be sure:
https://github.com/amirg00/Simple-Chat.git
Now, there are two directories: Server and Client.
Running The Server
In order to run the server, either run main.py in Server directory, or run through terminal and write the following command:
Simple-Chat/Server/main.py
Running The Client
In order to run the server, either run GUI.py in Client directory, but then you can't run multiple clients, or run through terminal and then for multiple clients run the command many times you want to.
To run the client through terminal write the following command:
Simple-Chat/Client/GUI.py
Such an example can be found in the project book.
We will first run the server.
Now, let's run a client and connect to the server by filling the details correctly, and after pressing the connect button.
And the client has successfully connected, we can of course run another client with the terminal as the done previously.
We will fill up the details (ip_address = 127.0.0.1, port = 13337, and username - could be whatever we want, e.g. BOB ) and click the Connect button.
We are finally connected to the server, and can now send and receive messages, etc...
Python Version: 3.9
Amir - here
Simcha - here
Project Link: here
Project book: here
Copyright © This Project last modified on March 5, 2022, by Amir & Simcha.