Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to write your own BitTorrent client in Java by using Bt library (smartspate.com)
53 points by atomashpolskiy on May 20, 2018 | hide | past | favorite | 22 comments


"How to write your own HTTP client using curl" is the vibe I get from this.

The library is the client here, the blog post is just about building an UI for it.


In fact there is only one short paragraph about the UI, and the rest of the article tells about the design, API and possible use cases. Not exactly like curl(1) man page, but also definitely not like what you say.


The title is “How to write your own BitTorrent client in Java by using Bt library”

The article says nothing about building a bittorrent client, it talks about interfacing with a library which implements a bittorrent client API.


> it talks about interfacing with a library which implements a bittorrent client API

Which is a valid way of building a piece of software commonly called a "bittorrent client". HTTP client isn't used in the same way, but "building a download manager using curl" would be a fair comparison.


May I ask you, what did you expect?



I'm personally more excited about torrent libraries that run inside webbrowsers. E.g.

https://github.com/webtorrent/webtorrent


Is this possible without using any (torrent specific) library?


Of course. You can read the protocol specification and/or study the source code of the existing libraries and clients to figure out how they work.

I think a reasonable first step is learning about B-encoding so that you can parse and generate torrent files.


Here is a bit torrent client I wrote back when I was in school. https://github.com/war1025/Torrent


How do you think Bt or libbittorent was written?


I was thinking about this kind of DIY short term effort to have an example of torrent functionality. Not collaborative development of a torrent library for 10 years.


Why would we write a special client ? I can spawn a cli tool and do it for me what I want


What if your software is supposed to work on multiple platforms or be self-contained? It's not targeted for personal use (at least that case is not the priority)


I did that more than 10 years ago using libtorrent. In 2018, an article on how to write a bittorrent client using an existing library is not that cool any more.


It's not supposed to be cool, just normal boring software that does useful things. As the author, I'm amazed by the number of people that contact me and ask questions on integrating Bt into their Java/Scala software which some of us use daily. In 2018 Bt is the most feature-complete BitTorrent implementation that is 100% pure Java.


Waiting for "how to write bittorrent library" series ;)


What I am trying to point out is that bittorrent is a well established protocol with a long list of client implementations[1]. 17 years[2] after the release of its original client in python, a particular library implementing the exact same protocol in a specific language is not a "news" - when this site is called "Hacker News".

In 2018, when it comes to bittorrent, I'd expect to see _real_ news/discussions, just a few examples on top of my head -

1. recent large scale measurement results, e.g. how many concurrent users in 2018, how many are using the selfish-and-trouble-making Xunlei, mobile usage, etc.

2. any sybil attack recently observed in its DHT? progress on sybil attack detection and prevention.

3. frameworks for scraping contents on bittorrent

4. recent progress on NAT traversal

[1] https://en.wikipedia.org/wiki/Comparison_of_BitTorrent_clien...

[2] https://en.wikipedia.org/wiki/BitTorrent_(software)


Hacker News is a bit of a misnomer. The guidelines are clear as to what's appropriate to submit:

> "On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity."

https://news.ycombinator.com/newsguidelines.html

It need not be new or news.


You've been here for over a year, shouldn't that be enough time to look at the rules once or otherwise realize Hacker News is not strictly for "news", and indeed the definition of good content for HN doesn't even mention news or new-ness?

You want to see content covering new developments for Bittorrent? Submit it instead of complaining that others content isn't revolutionary enough.


The first link contains a list of 3 (three) libraries. I personally would not call that "long". Anyways, your opinion is much appreciated, I'll make sure to check with you next time I decide to post something on HN.


Just because you may have experience doing it doesn't mean other people may know about it. And just because it's not new doesn't mean it's not cool. The upvote-only scheme of HN will speak for itself so you shouldn't care so much.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: