TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Build your own BitTorrent

457 pointsby romacover 1 year ago

25 comments

sarpover 1 year ago
Hi! Sarp here, author of the Build your own BitTorrent challenge on Codecrafters.<p>Some back story: After being laid off from my FAANG job, I found myself very unmotivated to go back. I started looking for interesting programming projects to revive my interest in coding. While nomading, I discovered Codecrafters on Nomadlist and really liked the push code to git and pass different stages interaction. The gamification helped me focus and projects allowed me to go deeper on software I used (SQLite, Git, Redis etc.). I even picked up a new language (Go) to do the challenges with. After completing all the challenges on the site, I ran out of things to do. This is when I decided to build a BitTorrent client which was one of the highly voted ideas on the site.<p>I learned many new things by building a BitTorrent client: the BitTorrent protocol, how torrent files are structured, encoding issues, pipelining network requests, url encoding binary values, using Channels in Go etc.<p>I’d love any feedback on the challenge. Also happy to answer any questions!
评论 #37945286 未加载
评论 #37948193 未加载
评论 #37951478 未加载
评论 #37945489 未加载
评论 #37949469 未加载
评论 #37944153 未加载
mr-karanover 1 year ago
Jon Gjengset[1] is currently doing a livestream on the same challenge in Rust, on his YT channel[2].<p>[1]: <a href="https:&#x2F;&#x2F;thesquareplanet.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;thesquareplanet.com&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=jSTkEPPiULs">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=jSTkEPPiULs</a>
评论 #37946649 未加载
评论 #37941663 未加载
评论 #37943854 未加载
评论 #37956377 未加载
评论 #37943914 未加载
throwaway4adayover 1 year ago
what&#x27;s with the sign in required, is this a paid tutorial?<p>Here are some free tutorials:<p>JS - <a href="https:&#x2F;&#x2F;allenkim67.github.io&#x2F;programming&#x2F;2016&#x2F;05&#x2F;04&#x2F;how-to-make-your-own-bittorrent-client.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;allenkim67.github.io&#x2F;programming&#x2F;2016&#x2F;05&#x2F;04&#x2F;how-to-m...</a><p>GO - <a href="https:&#x2F;&#x2F;blog.jse.li&#x2F;posts&#x2F;torrent&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.jse.li&#x2F;posts&#x2F;torrent&#x2F;</a><p>Python - <a href="https:&#x2F;&#x2F;markuseliasson.se&#x2F;article&#x2F;bittorrent-in-python&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;markuseliasson.se&#x2F;article&#x2F;bittorrent-in-python&#x2F;</a>
评论 #37943088 未加载
评论 #37945783 未加载
评论 #37943808 未加载
sunbumover 1 year ago
Why in the world does this want access to my github account, with 0 explanation as to why.
评论 #37941436 未加载
评论 #37941479 未加载
评论 #37941493 未加载
评论 #37943096 未加载
评论 #37944298 未加载
评论 #37941837 未加载
评论 #37941781 未加载
the8472over 1 year ago
Oddly the uploading part is missing. To be a peer, an equal, things have to flow both ways. Bittorrent wouldn&#x27;t work otherwise.
评论 #37943632 未加载
评论 #37943612 未加载
r3trohack3rover 1 year ago
For folks who speak JavaScript, Feross built WebTorrent which brought the protocol into a browser tab.<p>The code base is delightful to read. A lot of developers are better at writing code than they are reading it. If you&#x27;re wanting to flex your code-reading muscles, I haven&#x27;t found many better places to start than the WebTorrent codebase. I put it up there with redis in being fun to read.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;webtorrent&#x2F;webtorrent">https:&#x2F;&#x2F;github.com&#x2F;webtorrent&#x2F;webtorrent</a>
评论 #37945785 未加载
ikornaselurover 1 year ago
I really like this idea! I wanted to leant Erlang some time ago and a friend wanted to learn Crystal, so we set out to be able to share files between each other with completely custom clients! It was so much fun when we were able to exchange files with the base protocol and some.. Is it call BEP? Enhancements tk the protocol?<p>It&#x27;s probably my favourite way of learning a new language, as it&#x27;s simple enough to understand and implement
评论 #37943142 未加载
dizzydesover 1 year ago
As the years go on, I find there are fewer and fewer small project ideas that give me butterflies. But this is one!<p>Hadn&#x27;t heard of CodeCrafters before but I love how academic their challenge ideas are (eg build a DB). I&#x27;d love to see a compiler build in there too.
评论 #37943163 未加载
评论 #37943147 未加载
techn00over 1 year ago
Reminds me of building a bittorrent client in go: <a href="https:&#x2F;&#x2F;blog.jse.li&#x2F;posts&#x2F;torrent&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;blog.jse.li&#x2F;posts&#x2F;torrent&#x2F;</a>
评论 #37942717 未加载
batch12over 1 year ago
Years ago, one of my previous roles was building and supporting a custom linux live OS that could be used by employees on cheap netbooks (remember those?). To distribute updates, I ended up building our own internal torrent server from scratch and used it to distribute image updates. It was a good learning exercise as one of the first times I had built software to conform to a standard and work with out of the box clients.
评论 #37944022 未加载
r3trohack3rover 1 year ago
For anyone who is interested in peer-to-peer systems like this, and completes Sarp&#x27;s course, I have an open interview challenge you can submit it to if you find that you want to continue building in this space as a profession:<p><a href="https:&#x2F;&#x2F;gitlab.com&#x2F;webai-open&#x2F;network&#x2F;interview-challenge" rel="nofollow noreferrer">https:&#x2F;&#x2F;gitlab.com&#x2F;webai-open&#x2F;network&#x2F;interview-challenge</a><p>Take the guidelines to heart though. We evaluate you on demonstrating understanding of what you did, not that you completed the course.<p>My advice for standing out would be to continue building on it past the end of the course and do something cool yourself.
评论 #37950081 未加载
评论 #37947484 未加载
ducktectiveover 1 year ago
Does anyone know why BitTorrent-based Linux package managers has not become a thing?
评论 #37942050 未加载
评论 #37942628 未加载
评论 #37942352 未加载
评论 #37942306 未加载
评论 #37942063 未加载
eimrineover 1 year ago
Is this BitTorrent course free (as beer)? I can see a neighbour course about HTTP server &quot;free during beta&quot;.
评论 #37942018 未加载
评论 #37941921 未加载
评论 #37941874 未加载
Dowwieover 1 year ago
Can anyone comment as to how far one can go before paying for the codecrafters service?<p>The crowd that is interested in these kinds of experiences may also like Protohackers, which is completely free.
评论 #37943081 未加载
ashcatchumover 1 year ago
Have been exploring this and it is a pretty fun way to learn some of the intrinsics of some products we use daily!<p>I have also had positive interactions with Sarp so hoping this product takes off!
ahokaover 1 year ago
Does this include the DHT? BT, the protocol itself is not very interesting, it&#x27;s just a very bad file access protocol over HTTP without DHT, which makes it really P2P.
评论 #37943475 未加载
评论 #37946478 未加载
评论 #37943293 未加载
shp0ngleover 1 year ago
Wow this looks like a course I am willing to pay for.<p>And I wanted to learn Rust anyway :)
评论 #37943229 未加载
gabipurcaruover 1 year ago
This is super fun! I did the same back in uni, it was an awesome project: <a href="https:&#x2F;&#x2F;github.com&#x2F;bbpcr&#x2F;Yomato">https:&#x2F;&#x2F;github.com&#x2F;bbpcr&#x2F;Yomato</a>
lakomenover 1 year ago
Viewing on mobile.<p>Not sure what I see. There is no content, nothing clickable. Just decode bencoded strings and integers and some comments.<p>What&#x27;s the point?
评论 #37944074 未加载
rubiktubikover 1 year ago
I love the idea of this site but I don’t understand the pricing model. It says 30$&#x2F;month but I can only pay 120$ for 3 months. It should be 90$ for 3 month. A monthly payment model would be more accessible. I do I misunderstood something?
bogomipzover 1 year ago
I am curious has anyone subscribed to codecrafters.io and if so what was your impression of the service?
评论 #37945565 未加载
评论 #37951284 未加载
JyBover 1 year ago
&gt; downloading a file from a <i>single</i> peer<p>The hard part is avoided?
tetsuhamuover 1 year ago
It seems to be failing to create a repository right now
评论 #37943262 未加载
wonderwonderover 1 year ago
What a fun site
clubm8over 1 year ago
I wish more folks distributed Linux ISOs via Bittorrent since it has an integrity check built into the protocol -- messing with PGP is hard and showing me an MD5 sum over a self signed certificate is... just <i>special</i>.
评论 #37949801 未加载
评论 #37955923 未加载