ikatson / rqbit

A bittorrent client in Rust
Other
619 stars 57 forks source link

[Question]: rqbit vs qBittorrent API - compatibility with qbit_manage? (would be awesome is possible) #135

Open petalas opened 1 month ago

petalas commented 1 month ago

Just found this and it looks very promising!

I haven't had a chance to look at source code yet but wanted to ask, any chance this could be compatible with qbit_manage?

I guess would need tags and/or categories as a feature first but that should be easy compared to everything else.

I'm looking for a replacement for qBittorrent, ideally something that could saturate 10 or even 25 gigabit with a single instance but really don't want to give up qbit_manage.

Cheers!

ikatson commented 1 month ago

Any chance this could be compatible with qbit_manage

By a quick look, it's incompatible today, of course, because API wasn't modeled after any existing one, including qbittorrent.

It should be relatively easy to create new endpoints that mimic existing APIs, but of course, only for features that exist today (add,remove,pause,unpause).

You can look at http_api.rs for the existing API structure.

I'm looking for a replacement for qBittorrent, ideally something that could saturate 10 or even 25 gigabit with a single instance but really don't want to give up qbit_manage.

Did you test if rqbit can saturate 10 or 25 gigabit? Would be awesome if it can, but I've never tested on such a link.

petalas commented 1 month ago

It should be relatively easy to create new endpoints that mimic existing APIs, but of course, only for features that exist today (add,remove,pause,unpause).

Fair enough, makes sense 🙂

Did you test if rqbit can saturate 10 or 25 gigabit? Would be awesome if it can, but I've never tested on such a link.

I'll be happy to test if/when I rent a seedbox or colo a server, just trying to plan ahead.

Also, someone said they need two qBittorrent instances to maintain 1 Gbps with ~30 active torrents, and that "qBittorrent is multithreaded on IO (with mmap), but the network loop is single-threaded". Is rqbit fully multithreaded (or planned to be in the future at least)?

ikatson commented 1 month ago

Is rqbit fully multithreaded (or planned to be in the future at least)?

It's fully multi-threaded as to librqbit/rqbit itself. There's a few tokio tasks per torrent and a task per peer, and they all run in the tokio (by default multi-threaded) runtime. However I don't know how many event loops does tokio run under the hood - maybe it's only one.

ikatson commented 1 month ago

I've definitely seen it saturate 1gbps with 1 torrent. Didn't check 30 at a time though :)