Skip to content

tienleba167/reliable-transport-protocols-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

reliable-transport-protocols-java

Java implementations of two reliable transport protocols

Overview

This project implements a reliable data transfer protocol over an unreliable network simulator.

1, The sender and receiver use a Stop-and-Wait (with windowsize = 1) or Selective Repeat (SR) protocol with Cumulative Ack.

2, The sender and receiver use a Go-Back-N (GBN) protocol with Selective Acknowledgment (SACK).

The goal is to ensure that all messages generated from the sender's layer 5 are successfully delivered to the receiver's layer 5 in order, even under adverse network conditions. Performance is evaluated using trace-level outputs and analyzed across varying loss and corruption rates to assess the robustness of the protocol.

How to Reproduce Tracefile Results

  1. Run ./compile to compile the project.
  2. Run java Project to launch the simulator.
  3. Enter the simulation parameters when prompted.

Example input for SR with Cumulative Ack:

-- * Network Simulator v1.0 * --

Enter number of messages to simulate (> 0): [10] 1000

Enter packet loss probability (0.0 for no loss): [0.0] 0.1

Enter packet corruption probability (0.0 for no corruption): [0.0] 0.1

Enter average time between messages from sender's layer 5 (> 0.0): [1000] 200

Enter window size (> 0): [8] 8

Enter retransmission timeout (>0.0) [15.0] 30

Enter trace level (>= 0): [0] 3

Enter random seed: [0] 1234
  1. Trace results will be saved to a .txt file.

How to Reproduce Report Statistics

  1. Run ./automate_tests.sh.
    This script compiles all Java files and runs 45 tests using 5 random seeds with combinations of 3 corruption rates and 3 loss rates.
    All generated trace files are saved in the ./traces directory, and a results_summary.csv is generated in the project root.

  2. Run python3 analyze_results.py.
    This script reads results_summary.csv, computes confidence intervals (CI), and generates two performance analysis graphs.

About

Java implementations of two reliable transport protocols

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors