
How we built a P2P file sharing network from scratch - grailed
https://xorro-p2p.github.io/
======
grailed
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.

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

------
cdbattags
someone should add "2017" somewhere to this

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

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

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

~~~
keanebean86
#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.

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

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

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

------
vector_spaces
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

------
kingludite
distributed != decentralized

~~~
joombaga
Is there a problem with their definitions?

~~~
kingludite
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"

F

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

------
chrisjarvis
this is so interesting thanks for writing about it. I also want to do
something in this space and this is a great resource.

------
pictur
Great article

