This is an old revision of the document!


Le Project

In order to keep your momentum going, we're proposing you the following project.

For your project, you have to implement a simple Peer-To-Peer File Sharing service that provides a REST API. Your service will keep a list of the files that he shares and their corresponding MD5 hash. A peer can ask the service to provide a chunk from a given file, the rationale being that it can ask different chunks of the same file from different peers in order to rebuild the original, thus maximizing the throughput. In a similar manner, your service can download files from other peers.

A simple example flow would be:

  1. Ask peers for their list of files
  2. Identify the file that you want to download
  3. Ask peers for chunks of the same file (must have the same MD5) and rebuild the file, writing it on disk
  4. Check that the downloaded file has the same MD5 as the source. If the file is corrupted notify the user

You are required to use the vibe.d framework, as this will make the development process sweet and simple. vibe.d provides a toolkit for doing asynchronous I/O in a familiar and natural procedural style. It combines the intuitive and efficient programming style of synchronous I/O with the scalability of asynchronous I/O.

Your service must provide the following capabilities:

  • Authenticates an user. Only a logged in user can trigger a download action
  • Sends a register request to a new peer
  • Sends a register response ACK when accepting a register request
  • Sends a request of the list of shared files to all the known peers
  • Provides a JSON with the list of shared files and their corresponding MD5 as an answer to a list request
  • Starts the download of a given file from as many peers as possible
dss/project.1561042078.txt.gz ยท Last modified: 2019/06/20 17:47 by eduard.staniloiu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0