P2P File sharing app with central server
-> Inspiration - Bittorent and Napster
-> Three projects (Client, Server, Common resources)
-> .NET C#
-> Transact-SQL
-> UDP protocol
-> UDP Hole punching to resolve problem of NAT
-> Central server that has only information about files
-> P2P clients that sends and receives chunks
-> Binary file for tracking application state
-> Testing - Server with public IP address; Clients on different geographic locations; TeamViewer v12 for managing clients in real time
Client and server projects use common dll (third project called CommonResources). Their arhitectures have minor differences so next picture shows Client architecture. This arhitecture allows sending and receiving files at same time with more than one peer for every file. Receiving is sequential, chunks are reached in array. There are three layers: network layer, layer for transfering files and application layer. Network layer makes a connection, sends and receives messages. Layer for transfering files is central for application, it offers all structure and logic for transfering files. Classes for downloading and uploading files are separated in order to implement the layer granularly. Application layer consists of forms or we can say it is user interface. It also allows to register own file in system, start downloading and has classes for working with main binary file.
Client's file transfers
When user starts this application, he can see all his transfers including uploading and dowloading. Every file has name, extension, size and completion percentage.
If user wants to registrate his own file in system, he needs to click on button Browse and choose file.
Search
If user wants to download specific file, he can choose Search from menu. When he finds it, he needs to click twice on it in order to choose where he wants to save it. User can go back to File transfers now to follow up the downloading process.
Downloading process
Progress can be seen through the percentage that increases as user receives chunks of files. If he closes an application while downloading file, it will continue downloading it next time application is started.