Thanks!! Yeah, I was pursuing such design that would allow to replace/customize most of the parts, including the internals. As a bonus, it makes it easier to continue working on the library as the codebase grows (now nearing 25K lines of code)
Man this looks slick, going to give it a shot. Love the ability to be able to download a magnet link from the CLI and not worry about what some fancy GUI is doing in the background cuz I am paranoid.
I also have a simple shell script locally, that wraps the java command, so I have to just type `btmagnet AF0D9AA01A9AE123A73802CFA58CCAF355EB19F8` to download to a pre-determined location (hardcoded in the script). I wonder if I should share it on the CLI README page
Credit to OP, this looks like a really solid project. The CLI aspect of it reminds me of peerflix (https://github.com/mafintosh/peerflix), which I've been using for a while and am pretty happy with (no affiliation, promise)
It looks great but the top GIF makes it seem like you are offering a command line BT client. If I were you I would have it slowly scroll through the code of the client in the GIF or put a few frames of code of the client and or some compiling and then show the current top GIF.
Oh, I didn't expect this :) Sounds good, but I'm not sure I have patience do this right, it's such a pain to record gifs - I always misspell or misclick something, and by take #47 go completely nuts
Nice work. I'm wondering, how would you test/benchmark such an application. Besides manual testing on a variety of torrents, how would you do regression test there? same question for benchmarking. How to compare this work with another client?
I have several hundred unit tests and also a bunch of integration tests. While UTs usually test API of individual classes, each of the ITs creates a swarm of local peers and launches a torrenting session with certain conditions: seeders to leechers ratio, downloading from .torrent file vs using a magnet link, PEX enabled/disabled, encrypted vs raw message streams, etc.
Benchmarks (like in libtorrent) is something I'm looking forward to, but the project is still in the early stage -- there's a lot to be done with regards to optimization, i.e. switching to using NIO selectors, adding a caching layer, etc. That's a lot of work, and that's why I'm looking for collaborators, before investing more time into performance-tuning.
I would advise against implementing a custom cache for piece data. Caching file data in-app is counterproductive because it wastes memory duplicating data which the OS already holds in its page cache. Instead memory mapped I/O should be preferred.
I'm curious, it looks like the screenshot shows the author is using a Mac. But Mac OS hasn't shipped with Java in several years. So why Java? Is it simply familiarity, or are there other reasons?
A mix of both, actually. I've been using uTorrent for years until 2016, when I've decided to switch to some new OS X release. After installing the system update, the old, ad-free version of uTorrent has stopped working. The new version seemed a bloated mess to me, so I've tried a few other clients, but was left unsatisfied. Finally, in despair I've decided to write my own client with simplistic command-line UI, with emphasis on streaming movies. The sheer amount of new information in BEPs was enough for me to decide to take the easiest route and use the language, that I'm most familiar with.
Thanks for the reply (it seems my question caused an uproar here, oops).
I definitely like the idea. My question was more aimed to understand if Java has some desirable features for writing a torrent client maybe as part of the SDK or other 3rd party libs. I didn't even look at your source code yet :P
Java stood out to me because I don't think I've seen other CLIs written in Java.
You're conflating developer tools with a language runtime. Every popular OS ships with everything necessary to run a C, Go, or Rust binary. Python 3 and Java both require a separate runtime to be installed, but I will say that every Java CLI I've used has had terrible startup performance.
Technically _most_ ship with a C compiler and a python compiler since pretty well every linux distribution & bsd distribution has those. But that really doesn't have anything to do with which language you should use.
Thank you! Calendar year, in the evenings and on weekends, with sprints of several weeks and a month or two of rest/AFK after each sprint to keep sanity (I have a full-time job, a wife and a 3 year old kid). Happy that I had the persistence to keep working on the project
I also have a simple shell script locally, that wraps the java command, so I have to just type `btmagnet AF0D9AA01A9AE123A73802CFA58CCAF355EB19F8` to download to a pre-determined location (hardcoded in the script). I wonder if I should share it on the CLI README page
Or don't use the Oracle proprietary distribution but the OpenJDK of your operating system which normally doesn't exclude proper crypto algorithms.
(be aware that the JDKs downgrade silently if certain libraries are missing in your host)
Benchmarks (like in libtorrent) is something I'm looking forward to, but the project is still in the early stage -- there's a lot to be done with regards to optimization, i.e. switching to using NIO selectors, adding a caching layer, etc. That's a lot of work, and that's why I'm looking for collaborators, before investing more time into performance-tuning.
Will look forward to reading through the code later!
I definitely like the idea. My question was more aimed to understand if Java has some desirable features for writing a torrent client maybe as part of the SDK or other 3rd party libs. I didn't even look at your source code yet :P
Java stood out to me because I don't think I've seen other CLIs written in Java.