Re: Reliable P2P Framework???
From: Vikas Ahuja (someone_at_somewhere.com)
Date: 03/01/04
- Previous message: Nathan: "Launching a c# dialog from an c++ application"
- In reply to: Ebrahim: "Reliable P2P Framework???"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 01 Mar 2004 22:16:14 GMT
Hi Ebrahim,
Your idea of having auxilliary servers is very appealing to the
"large-scale" system designer. However, it might be overkill if you are
planning to start your P2P program with a few users and develop it further
if it is successfully accepted. If you are thinking of (and are confident
about) a Napster-scale program, then auxilliary servers, in my opinion, are
not just recommended but required. They will emulate a server-farm type
structure, thus supporting large systems. But, if we limit ourselves to a
smaller scale, having one central server with multiple clients should work
just fine.
Next, coming on to the problem of downloading multiple files at the same
time. I dont understand why you want to "remove" a file being downloaded
from the database, and prevent others from downloading it. If you are
worried that the computer that is serving the file ("filehost") will keep
the file locked for as long as downloader1 is transferring it, you can solve
the problem by quickly loading the file into a temporary area (memory or
temp file) as soon as it is asked for, and closing the file immediately.
downloader1 will download the file from the temporary location on filehost,
thus keeping the original file free for downloader2.
Further, regarding the maximum number of connections per client - why must
you restrict it to any number at design time? If you set an option in the
program itself to select the maximum number of simultaneous connections, the
user will be able to configure it depending on how they want to use the
program. TCP/IP as such (or System.Net.Sockets, if you please) does not
limit you on the number of open connections on a Listener socket. And when
the max number of connections is reached for a computer, all further
incoming requests will be queued (or simply denied, to start with a simple
system).
Hope this helps you reach a decision point.
Vikas
"Ebrahim" <ebrahimbandookwala@hotmail.com> wrote in message
news:c5a5cacc.0402272134.330e5842@posting.google.com...
> Im working on a p2p file sharing network (in C#) but im having
> problems in my conflict resolution ( for 2 clients requesting the same
> file. )
>
> My Network Architecture is some thing like this :
>
> A Central Server :
> It is the starting point of my network . All auxillary servers
> register their local IPendpoints here . These IP End Points are given
> to incoming Client s .. so they can then connect to that specific
> auxillary and join the network .
>
> It will also house the central database(read on) which will host all a
> list of all files on all clients .
>
> An Auxillary Server :
> Each auxillary has 3 (can be increased) local ports on which it waits
> for incoming client requests . Once a client gets connected to the
> auxillary it sends it , its file list . (Thus the auxillary maintains
> a file list of all clients connected to it. {Not sure if i should do
> this ?? } ) .
> The auxillary also .. always maintains 1 connection always with each
> of its clients .
> This is not the case for the server . Every time the Aux. and the
> central need to communicate a new TCP connection is started .
>
> A Client :
> A client first gets itself an auxillary from the central and then
> stays connected to it through out its life time / or until it
> disconnects from the auxillary.
>
> [ALL this is DONE ]
>
> Now I cannot figure out whether only the central should host the
> database or also each of the auxillaries .
>
> What i had thought of was :
> The central maintain the Database . Every time a client need to search
> for a particular file on the network .. it tells its respective
> auxillary which then returns a file list (from the central) with IP's
> of all clients having that file . Then that client chooses a file from
> that file list .. again tells the server that ; that particular file
> is going to be downloaded so remove it from the Database (so that no
> one else can search for it} . It then directly connects to the other
> client having that file and starts transfer .
>
> This seems fine but has a lot of problems . To start with what if 2
> clients on 2 different auxillaries request the same file . Both will
> start downloading it coz both will assume that the server will remove
> its entry from the database .
>
> Secondly what if a particular client A has 3 files 1,2,3 . Client B
> starts downloading 1 , client C starts downloading 2 . 3 's entry will
> still exist on the server ; but there will be no outgoing connections
> left on A ( each client has only 2 outgoing connections . ) for a
> client D who wishes to download that file .
>
>
> I wish to implement the protocol with least amount of data exchanged
> between all 3 programs !!
>
> ANY IDEAS ?? pls help
- Previous message: Nathan: "Launching a c# dialog from an c++ application"
- In reply to: Ebrahim: "Reliable P2P Framework???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|