Building a BitTorrent client from the ground up in Go (2020)
1–10 of 93 posts
Re: Building a BitTorrent client from the ground up in Go (2020)
#2Now I wonder how clients protect themselves against abusers (i.e.. people who never upload a single bit but only download). I often noticed that when I set the maximum upstream to 0, clients would stop sending me pieces. Do clients share a predefined list of configuration parameters with each other or with the tracker (Max upstream, max downstream, etc.)? Or is it something more sophisticated?
Re: Building a BitTorrent client from the ground up in Go (2020)
#3Re: Building a BitTorrent client from the ground up in Go (2020)
#4Re: Building a BitTorrent client from the ground up in Go (2020)
#5Do you know more such problems?
Re: Building a BitTorrent client from the ground up in Go (2020)
#6Re: Building a BitTorrent client from the ground up in Go (2020)
#7This looks simple not only because the article is written well but also because Go is the go-to-language for complex networking situations. Doing things in parallel, even pipelining? This would make quite some spaghetti algorithm in C/C++, even async rust/python world would not look so clean as in Go. This is clearly a big strength of the language.
And Elixir / Erlang for serious ones.
Re: Building a BitTorrent client from the ground up in Go (2020)
#8This looks simple not only because the article is written well but also because Go is the go-to-language for complex networking situations. Doing things in parallel, even pipelining? This would make quite some spaghetti algorithm in C/C++, even async rust/python world would not look so clean as in Go. This is clearly a big strength of the language.
Re: Building a BitTorrent client from the ground up in Go (2020)
#9Very cool, and surprisingly simple. I was always mystified as a kid how these file-sharing protocols actually work, but if you just look at a torrent as a collection of fixed-size pieces you are asking peers managed by a tracker for, it becomes really straightforward to implement. Now I wonder how clients protect themselves against abusers (i.e.. people who never upload a single bit but only download). I often notice…
Re: Building a BitTorrent client from the ground up in Go (2020)
#10This is possible with port forwarding. But that's a niche set of peers, who have the power to configure port forwarding on a NAT proxy.