Hacker News new | past | comments | ask | show | jobs | submit login
How we built a P2P file sharing network from scratch (xorro-p2p.github.io)
145 points by grailed 76 days ago | hide | past | web | favorite | 18 comments

This article outlines how three engineers built a p2p file sharing network from scratch, and what they learned along the way.

It's a great high level primer if you're curious about how distributed hash tables or sharding works.


Not sure I follow, could you expand ?

Absolutely amazing article. Where can I get work like this where I get to design distributed systems from scratch ?

someone should add "2017" somewhere to this

Why? It doesn't seem like time-sensitive content. Should any link to tutorials or documentation also have a date on it?

Perhaps yes. Unless you don't mind kids learning to code like it's 1995 again.

An article titled "Teaching kids to code like it's 1995" would definitely spark my interest. Somebody please write that!

What's wrong with coding like it's 1995? Did I miss some major paradigm shift in programming?

#1 Thanks to the internet, Async has because far more important to understand. #2 CPUs have gotten waaay faster and ram is now plentiful so there's little need for heavy optimization in most cases. #3 you're almost guaranteed to have at least 2 core available so multi-threading is a real option now. #4 monolithic code bases are the devil now #5 some 3rd gen and I think all 4th gen laungages include automatic garbage collections so memory allocation is not a concern for most people

Ok I guess none of those are huge paradigm shifts but in many ways we've gotten pretty spoiled over the past 25 years. A lot of the old struggles have been mitigated at the expense of a lot of cpu cycles. NPM is a great example of the unneeded waste that has accumulated over that time.

We went from think about every byte to just tossing everything in and letting a transpiler remove all the fluff. You can certainly make the argument that computers should do that work but I think theres a middle ground between neurotic 1995 and kitchen sink 2019 that we'll hopefully eventually find.

Hey, nice points. Really, no sarcasm, I wholeheartedly agree. However you, like me, seem to disagree with our parent comment - that coding 1995 was not really that bad...

Is it P2P but not decentralized because clients get metadata from supernode1.xorro-p2p.com?

They have a DHT; I think the supernode is just for bootstrapping. Similarly all Bittorrent clients start with a hardcoded list of peers.

I'm working through the first set of Cryptopals so I appreciate the discussion of XOR distance here. Wondered if xorro referred to the XOR operation, now I know. Thanks for sharing

distributed != decentralized

Is there a problem with their definitions?

The text fails to explain the difference between the 3 types of networks. Centralized, decentralized and distributed.

> "BitTorrent, Gnutella, Freenet: Decentralized"

> "In a decentralized system like BitTorrent, every computer/node acts as a client and server"


Why use SHA1 if you’re building it from scratch?

Great article

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