boramalper / magnetico

Autonomous (self-hosted) BitTorrent DHT search engine suite.
http://labs.boramalper.org/magnetico/
GNU Affero General Public License v3.0
3.06k stars 344 forks source link

Throttling enabled #227

Open lruggieri opened 5 years ago

lruggieri commented 5 years ago

Added a simple throttler to limit the mps. Nothing fancy, just a limiter on the number of messages (of any kind) sent each second.

theblazehen commented 5 years ago

I'm trying to build it, but I'm getting

root@torrentsearch:~/magnetico/magnetico/cmd/magneticod# go build .
# _/root/magnetico/magnetico/cmd/magneticod
./main.go:188:2: undefined: mainline.DefaultThrottleRate
lruggieri commented 5 years ago

I'm trying to build it, but I'm getting

root@torrentsearch:~/magnetico/magnetico/cmd/magneticod# go build .
# _/root/magnetico/magnetico/cmd/magneticod
./main.go:188:2: undefined: mainline.DefaultThrottleRate

@theblazehen

cd ~
git clone https://github.com/boramalper/magnetico.git
cd magnetico
git fetch origin +refs/pull/227/merge
git checkout FETCH_HEAD
cd cmd/magneticod/
go build .

This seems to work pretty fine. If it does not for you, I would guess something is wrong either with the way you checked out this PR or the way you set your GOPATH (even though working with go mod should not yield any problem).

boramalper commented 3 years ago

Hi @lruggieri

Added a simple throttler to limit the mps

What is mps? It seems requests per second but which requests are you talking about? DHT or BitTorrent?