Networks and Security Project
We received a 9.5 for this solution - Instructor said probably the strongest submission of the past years
The project in short
The task was to implement a reliable datatransfer protocol build upon the UDP protocol immitating the TCP protocol (bTCP is short for basic-TCP). We were provided with a working UDP protocol (called the lossy layer) and a simple interface acting as the application layer. We were tasked with implementing sockets.
Key parts of our implementation
We had to implement a working handshake. The sockets followed a finite state machine, which we used to guide the sockets through this process. We had to exchange sequence numbers, window sizes and protocol types. As the application layer and the network layer run on different threads we also had to take that into account.
When the handshake is completed, meaning the sockets were in-sync and ready to transfer data, we had to implement a protocol to ensure the data transfer was reliable. We implemented GBN (Go-Back-N) and SR (Selective Repeat). We additionally implemented a proper OO structure to facilitate multiple protocols and expanded the provided command-line UI to support this extra feature.
We also had to merge the server socket and client socket into a so-called hybrid socket. This socket can now act as either a server (data-receiver) or a client (data-sender).
Key skills learned/used in this project
- Incorperating a finite state machine into the core of an implementation
- Construction proper and more elaborate OO structures/patterns
- Working with multiple threads and providing thread-safe code
- Working with more rudimentary networking modules in Python