Skip to content

chatApp with self made Reliable data transfer including congestion and flow control.

Notifications You must be signed in to change notification settings

eladsez/Walk2Talk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Walk2Talk

Introduction

  • If you just want to know how to use this code please skip to the How To Use segment below.

This project is split into 2 parts, a TCP chat messenger which can trasnfer files over realiable UDP.
We had to create an entire relialbe data transfer over UDP in order to allow our file transfer to be complete and whole.
our chat allows -

  • communication over TCP in a broadcast and in between clients, meaning each client has the ability to send and receive messages from and to every guest in the room.
  • file downloading over RUDP ( relialbe UDP ) from the hosting server.

Approach

Our appoarch for this project was at first to model the entire classes using abstract classes and interfaces.
Moving on we started with basics - implement a client - server model with a simple chat cmd, we decided to create a GUI for our debuggin to see how everything works which stuck with us and was left as a part of project.
The project is created in a view of MVC -
Modeling - RDT algortihm + client - server classes.
View - Our Graphic user interface which is the chat app.
Controller - a class dedicated for combinding both the model and and view parts.

  • for further knowledge about the heirarcy in detail we've dedicated wiki page for it.

The Algorithm

We choose to go with the idea behind Selective repeat Congestion Control.
Our algorithm for file transfer over udp with CC -

  1. connection establishement for a file name over TCP.

  2. get the file transfer over udp while getting consistent acks from the client for each frame sent by the server and recieved by the client.

  3. if a ack is not recieved, the algorithm will resend the packet, while considering in hand the idea behind Selective repeat -
    instead of sending the entire window again, it will only send the missing packet.

  4. using flow control to increase and decrease the window size -
    we used the idea of duplicate acks and timeouts to check wether we need to increase or decrease the window size given the connection validity.
    our appoarch for flow control is to increase the window size by the power of 2 slowly on case where we got 3 dup acks, we will decrese the window in half, and lastly if we get a timeout, we will restart from 0.

    state_Diagram v2

How To use

To activate the application, there are few steps to be taken before. we will explain in detail below.

File_Heirarchy

You will only need to run the highlighted python files.

  • First, go to the server.py file and run it :

Run_Server

  • After that, you'll need to run client_1.py, client_2.py, in the RunApp folder to join the server.

Right now there are only two available if you want to add more clients, just copy paste the python file.

Run_Client

  • After that a window will pop :

LoginWindow

  • Enter a username ( right now password is not required, we will consider adding DataBase later for that ).
  • Moving on, click on the login button, and it will connect to the server :

Room

  • Start Chatting! Enjoy.

CLASS UML DIAGRAM

UML

dependencies

Tkinter - please see Tkinter documentaion
Tkinter Themes - please see Tkinter Themes documenation
Pillow - please see Pillow documentation

Reading Material

This assignment is a part of our Computer Networking course in Ariel University

About

chatApp with self made Reliable data transfer including congestion and flow control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages