Peer To Peer File Sharing...

D

Dom Rout

Hello.
Well, this is my first post on any USENET group anywhere, so I hope I
get it right. Basically, I just want to get some opinions on a plan of
mine for a new project.

I want to produce a small, peer to peer, file sharing network for the
use of myself and some of my friends. The purpose of this is basically
to allow us to share files conveniently without relying on technology
such as Windows Live Messenger (Yuck).

I have a VPS which I would like to dedicate to the task of acting as a
tracker, so I can run a server application written in python on it. I
will also write the first client in python, although I may go for a
different language for the client in the final version, for
performance. For now, Python is perfect because of the ease of use
that it offers and the fact that I already know a bit about socket
programming using it.

Also concerning architecture, I will also have a number of peers that
connect to the tracker and also to other peers, via an IP address
provided by the server, as necessary to download the files.

The files themselves should be split up into "Chunks" of fixed length,
which will be given an index and tracked by the server. The server
should know which clients have which chunks of a file, and when a
client needs to download a file the server should look for other
clients that have chunks from that file and give the IP address to the
client, which should then for a connection to this peer and download
the parts of the file that are available.

When managing the chunks of a file, I will need to use a mutex to
allow reading and writing of them. I should provide a getter and
setter method in each file to allow chunks to be placed into it more
conveniently. The getter and setter should both use mutex's to allow
multiple threads of uploads and downloads at the same time.

I will need to implement a username and password system, to restrict
the users of the system to people that I trust.

To uniquely identify a file, I would like to use a file path. There
should be a theoretical directory that contains all shared files,
although the client should be given the option of which files from the
directory to download.

This directory should look like:
"Global/"
"Global/Images/"
"Global/Music/"
"Users/<username>/<sharedfolder>"

It would be nice if it was possible to subscribe to certain
directories, and download new files from them as need be.

Well, these are my ideas so far. Is anything drastically obviously
wrong, and can anyone suggest to me any best practices when
implementing this sort of design?

Thanks, Dominic Rout.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top