Git dissect

P2P internals - episode 4

It’s been a long time since my previous post, but let’s continue this serie about distributed systems with a tool that a lot of people use every day: git.

Git is a versioning tool. Unlike some systems like subversion, you don’t need to have a server to use git. Every member of the project own a (partial or not) copy of the project and can directly send data to another member. So, even if today a lot of people use platforms like Gitea, GitLab, GitHub, etc. it’s possible to work without any of them (can be useful when the platform is down).

[Read More]
p2p  dev  git 

P2P internals - episode 3

DHT

In the previous articles we talked about how to create a peer to peer connection and what issues we can encounter. These problems are generally due to the NAT which needs methods to pass through it (e.g. TURN servers) or some new protocols (like ICE).

It is now time to talk about distributed applications and structures created on top of a p2p network.

For a lot of distributed applications, all the nodes in the system can’t be stable. In fact, nodes continuously join and leave the network for a lot of reasons. So, we need to use a structure which connects all the nodes of the network to maximize the coverage of that network (we don’t want to have nodes in a sub-net) and to get the best response time.

[Read More]
p2p  dev 

P2P internals - episode 2

ICE (RFC 6544, RFC 8445)

In the first article of this series, we saw how to make an application (DEL) which is able to transfer a file from one peer to one another by successfully bypassing the NAT thanks to a TURN server. However, this technique is not really effective, because, in a lot of cases, a TURN server is completely useless. Indeed, if both peers are on the same network or both peers has an IPv6 address, the TURN server is not mandatory. Now, Alice wants to improve DEL to only use the TURN server as a fallback.

[Read More]
p2p  dev 

P2P internals - episode 1

TURN over TCP (RFC 6062)

I love distributed systems for a various of reasons. But these systems are complex and require interactions with many layers. Even if a lot of distributed systems and software exists, such systems can be difficult to use for several reasons. Today, our operating systems tend to avoid doing as many calculations as possible (i.e. mobile devices need to save battery and avoid data consumption). Also, IPv4 is still massively used so NATs are still needed, interfaces are mainly created to interact with servers, etc. This is why I want to explain some common problems we can encounter when creating a peer to peer system and to describe existing solutions.

[Read More]
p2p  dev