Live data from Hacker News

Show HN: Synapse, a full featured BitTorrent client in Rust

github.com

41–50 of 73 posts

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#41
post #8

Earlier quoted context omitted.

Synapse is not designed for people who want this use-case. It's primarily designed for seedbox users who want a daemon to control remotely. It's also designed to efficiently work at scale, and takes advantage of native features like mmap to download quickly. Also, it wasn't rewritten in Rust from some other language, it was written in Rust in the first place.

How does mmap improve download speed?

Not the author, but I think that the point is to make disk I/O async with respect to requesting and receiving blocks. I.e. request for the next block does not wait for the write of the previous block to complete.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#42
post #3

Unfortunate name clash ( https://github.com/matrix-org/synapse )

Someone ought to write a website that scrapes popular OSS hosting sites and package repositories and comes up with a list of English words that haven't been taken already. :P

Make it, and then name this app "Dictionary" :P

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#43
post #26

Earlier quoted context omitted.

Ha yeah. Everyone pointed that out the first time this came up and I guess he ignored the feedback.

I actually find it seriously impressive. It demonstrates it works for you right now , and it works seamlessly!

It's impressive, but it doesn't necessarily actually download the file from webtorrent peers. It will happily do HTTP streaming, instead.

It works fine for me even though my browser is configured to block third party traffic by default.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#44

Earlier quoted context omitted.

>(Also, what great irony this proxy is written in python, eh?) It's written by a different person (me). Also Transmission is written in C FYI

Yes. That was what was ironic since I (wrongly) complained about slow python based software.

The first implementation of BitTorrent was written in Python. I don't think it has happened once since, not as any serious attempt anyway.

The clients that use Python today are not slow because they all use rasterbar-libtorrent as a C Python module that performs all of the heavy lifting.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#45

Earlier quoted context omitted.

The Opera web browser had a torrent client built-in for a long time. https://en.wikipedia.org/wiki/History_of_the_Opera_web_brows... Looks like since version 9, released in 2006.

Honestly it should be standard in all browsers.

What if I'd argue otherwise - that download managers (including plain HTTP(S) downloads) shouldn't be a part of browser, but a separate pieces of software?

I suspect that in modern "we don't download anything, we watch/read/run this on the web" times in-browser downloading is bound to be second-class citizen that vendors would not pay any significant attention to beyond the simplest scenarios. Basically, the torrent support will be barely functional, just like the current HTTP downloads are. If they're split in a separate program (buzzword: microservice) they still have a chance, though.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#46

So, if I understand this correctly, Rust would be a good fit for bittorrent, right? Handling lots of stuff simultaneously, peers, trackers etc, to me a bittorrent that actually does more than download and quit always seems like something quite heavy...

Rust would be a good fit, yes, but many other languages could be a more comfortable fit. For example since we're just doing a simple data processing task, a simple language like Go would work perfectly. Since the realtime constraints are not super strict, you can build fine BT clients in comfortable languages such as C# or Java as well.

An advantage of Rust however is that it's easy to expose a C api from it, so it can easily be integrated into a project done in a more comfortable language.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#47

Earlier quoted context omitted.

How does mmap improve download speed?

Not the author, but I think that the point is to make disk I/O async with respect to requesting and receiving blocks. I.e. request for the next block does not wait for the write of the previous block to complete.

And this makes sense when disk is slow and you have much more RAM than network traffic. If RAM is small, while net traffic and disk are both fast, mmap writes may result in poor file layout due to arbitrary OS flush order.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#48

So, if I understand this correctly, Rust would be a good fit for bittorrent, right? Handling lots of stuff simultaneously, peers, trackers etc, to me a bittorrent that actually does more than download and quit always seems like something quite heavy...

It does seem like a good fit, yes. Just for example, rtorrent regularly crashes every few days.

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#49
post #8
post #4

Not that I'm not always eager to see something get rewritten in Rust , but I'm curious whether web browsers have advanced to the point where a bittorrent client could exist as a webapp rather than requiring native installation. Could the bittorrent protocol operate over WebRTC?

Synapse is not designed for people who want this use-case. It's primarily designed for seedbox users who want a daemon to control remotely. It's also designed to efficiently work at scale, and takes advantage of native features like mmap to download quickly. Also, it wasn't rewritten in Rust from some other language, it was written in Rust in the first place.

Is it also to reduce security concerns?

Re: Show HN: Synapse, a full featured BitTorrent client in Rust

#50

So, if I understand this correctly, Rust would be a good fit for bittorrent, right? Handling lots of stuff simultaneously, peers, trackers etc, to me a bittorrent that actually does more than download and quit always seems like something quite heavy...

Security is the main gain for many people.
Post reply on HN