UDP based filesharing ?

Know of something that might be useful to the DC community? Post it here! (Still, no advertising)

Moderator: Moderators

Locked
gnipi
Posts: 4
Joined: 2006-09-06 10:56
Contact:

UDP based filesharing ?

Post by gnipi » 2006-09-07 17:20

this library is supposed to be open-source and completely free for non-comercial use ... and it's also supposed to be the best library for gaming...

it uses reliable UDP (re-transmissions implemented on packet loss)

http://www.rakkarsoft.com/


I would like to see something similar in the future of direct-connect

we really need to switch to UDP, and using a simple Library/api that already has all the hard work finished sounds good. it is completely cross-platform and well supported.

if anybody is interested in taking a look, maybe we could get at least some planning started ?

oh I almost forget, it also supports sha-1 ... encryption ...

writing best software is knowing what to reuse and what to (re)-implement.

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2006-09-08 02:08

First off: DC++ is not for gaming. In online gaming it doesn't matter much if you loose a couple of packets here and there, since speed is more essential. In filetransfers, it's the exact opposite as far as i know.

Second: Why do we "really need to" switch to UDP? We've already got reliable re-transmissions on packet loss, it's called TCP!

Writing best software is knowing how to avoid bloating your program with useless "features".

ullner
Forum Moderator
Posts: 333
Joined: 2004-09-10 11:00
Contact:

Post by ullner » 2006-09-08 05:46

AFAIK, someone has (theoretically) broken SHA-1...

gnipi
Posts: 4
Joined: 2006-09-06 10:56
Contact:

Post by gnipi » 2006-09-08 10:44

ullner wrote:AFAIK, someone has (theoretically) broken SHA-1...
true :)

anyway, point is, tcp is not that much reliable - you can't control error tolerance so connection drops easily on saturated links.

Reliable UDP (as in, automatic correction, fully transparent) should be better in most cases. I must admint that I mainly want DC to work better on wireless networks (more packet loss) reliably. with current tcp/ip implementation, connection is just not stable enough...

anyway, "bloating" is when you put useless code...

I'd call current network code of DC++ bloating....

using good quality lib that has great support for networking is hardly bloating...
anyway, reinventing the wheel is what should be avoided - except if you can prove that your wheel is better or cheaper :)

PseudonympH
Forum Moderator
Posts: 366
Joined: 2004-03-06 02:46

Post by PseudonympH » 2006-09-09 13:38

Yes, reinventing the wheel should be avoided, which is why you should use SCTP if you want reliable datagrams.

TCP was designed to back off in saturated networks so that all hosts get their fair share. Reimplementing it over UDP is silly. The library you describe is designed the way it is to prevent lost packets from blocking reception of the ones following it until it is resent. With file transfers, this latency doesn't matter, as whether things are delivered in one chunk of 100k or 4 chunks of 25k makes no difference.

Locked