
How to write your own BitTorrent client in Java by using Bt library - atomashpolskiy
https://www.smartspate.com/how-to-write-your-own-bittorrent-client-by-using-bt-library/
======
ryanlol
"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.

~~~
atomashpolskiy
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.

~~~
ryanlol
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.

~~~
detaro
> _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.

------
atomashpolskiy
Github:
[https://github.com/atomashpolskiy/bt](https://github.com/atomashpolskiy/bt)

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

[https://github.com/webtorrent/webtorrent](https://github.com/webtorrent/webtorrent)

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

~~~
consto
How do you think Bt or libbittorent was written?

~~~
MichailP
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.

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

~~~
atomashpolskiy
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)

------
dis-sys
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.

~~~
atomashpolskiy
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.

~~~
dis-sys
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...](https://en.wikipedia.org/wiki/Comparison_of_BitTorrent_clients)

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

~~~
grzm
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](https://news.ycombinator.com/newsguidelines.html)

It need not be new or news.

