Peer To Peer File Sharing...

Discussion in 'Python' started by Dom Rout, Jan 8, 2008.

  1. Dom Rout

    Dom Rout Guest

    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:

    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.
    Dom Rout, Jan 8, 2008
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John O'Conner
    Jan 30, 2004
  2. Sudheer
    Roedy Green
    Apr 1, 2004
  3. Guy Noir

    Re: peer to peer messaging

    Guy Noir, May 26, 2005, in forum: Java
    Owen Jacobson
    May 31, 2005
  4. Matt Gessner
  5. Replies: