Skip to content

SimchaTeich/Simple-Chat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Chat Final Project

Content
  1. About The Project
  2. System's Structure
  3. Fast Reliable UDP Via Go-Back-N With CC Algorithm
  4. Code Details
  5. How to run
  6. Languages and Tools
  7. Acknowledgements
  8. Contact

About The Project

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...


System's Structure

This is a glance from above of the server's architecture.

Screenshot_35607dc5643cf3c59.png

Explanation of 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)

Explanation of Client's Architecture

This is a glance from above of the client's architecture.

Screenshot_47ddc60a39f32fdc4.png

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.


Fast Reliable UDP Via Go-Back-N With CC Algorithm

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.

Sender's Side

Receiver's Side


Code Details

Unified Modeling Language (UML) :

Server Directory UML:

Client Directory UML:


How to run

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

Running Example

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


Languages and Tools

Acknowledgements

Contact [Top▲](Simple-Chat Final Project)

Amir - here

Simcha - here

Project Link: here

Project book: here


Copyright © This Project last modified on March 5, 2022, by Amir & Simcha.

About

A final project in a communication and computing course

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%