The peer findability and message routability challenges of P2P networks are typically addressed in similar ways. This tutorial covers common solutions to peer findability and message routability in peer-to-peer networks.
Peers in a peer-to-peer network need to be able to address each other uniquely. That it was peer addressability refers to. This tutorial explains how common P2P algorithms approaches peer addressability.
Peers in a peer-to-peer network need to be able to connect to each other in order to communicate with each other. I explain common solutions to overcoming NAT and firewall problems in this peer connectivity tutorial.
A lot has happened in the world of Peer-to-Peer (P2P) networks since I wrote the first version of this tutorial - so I have started updating it. First step was updating the introduction.
Single-threaded concurrency designs are an alternative to multithreaded concurrency designs which achieves many of the same benefits (task switching) without many of the multithreading problems (thread update visibility, race conditions etc.etc.).
The Producer Consumer Pattern is a work load distribution pattern where the number of worker threads are decoupled from the number of tasks to execute.
The Java BlockingQueue interface represents a queue which can block threads from inserting into a full queue, or block threads from dequeuing from an empty queue.
In this tutorial I explain 3 common methods for preventing deadlock occurring. I have also made a video version of this tutorial.
Deadlock is when two or more threads end up blocked indefinitely waiting for each other to release resources they need to lock to do their job. I have updated the Deadlock tutorial.