CSE 720 Programming Assignment: Peer-to-peer Video Streaming
Due Date: May 1st 2014, Thursday, 23:59

In this assignment you will implement a P2P video streaming application according to the specification given below. The application will consist of two components: (a) a server discovery component and (b) a video streaming component. You can choose any programming language.

Protocol Description

Your P2P protocol will use the centralized index approach. It should be consist of two parts: a centralized 'registry' and a client/server application for video streaming between users. Your protocol will implement the four key operations of P2P applications: join, publish, search, and fetch.

Join: The registry will listen to a TCP socket at a known port. A new user will contact the registry at this port and indicate its presence. In addition, the registry also listens to a UDP socket and every 60 seconds the user issues a 'HELLO' message to the UDP port of the registry. If the registry has not received a HELLO message from a user in 200 seconds, the user is removed from the list of available users.

Publish: After registration, the user sends a list of available video files to the registry (e.g., all files in a directory specified as command-line parameter).

Search: A user looking for a video contacts the registry. The registry looks for the video file in its database (matching names) and returns the contact address of the user if an entry was found (the first matching entry).

Fetch: The searching user (client) contacts the user with the video file (server) and requests the streaming of the video using Real Time Protocol (RTP). The client will be able to control the actions of the server using Real-Time Streaming Protocol (RTSP). A client should be able to send Setup, Play, Pause and Teardown commands to the server.

You have to implement a user interface with appropriate buttons.

Bonus (up to 30%)

1. Add authentication and/or encryption to your P2P network
2. Instead of streaming stored video, your application will be able to provide streaming of live video obtained from a web cam.

Submission

The due date for this assignment is May 1, 2014, 11.59pm. You have to submit a zip file "your_name.zip" including all source codes, a 'readme' file which contains a project summary, your solution approach, any encountered problems and how you solved them, any unresolved issues, and a usage explanation. You can submit your projects to the e-mail address of the instructor.
Late submissions: 25% penalty after the deadline and another 25% for every 24h after the deadline.

This assignment is to be done individually. Do not show your code to others and do not look at other students' code. Prevent other students from accessing your code (do not put it in a public directory). However, you are free to use any tools you like (library, search engines), to discuss problems with others, and to seek the help of the instructor.