Computer Network & Network Security System β Application Layer, NEC licence examination syllabus (Nepal Engineering Council).
Every device is simultaneously a client AND a server β the exact opposite of how most of the internet works.
Client-serverA dedicated server handles all requests; clients only ever talk to the server, never to each other.
P2PEvery participant ("peer") can act as both client and server β downloading from others while simultaneously uploading to others.
BitTorrent is the classic real-world example: a file is split into many small pieces, and you download different pieces from many different peers simultaneously, while also uploading pieces you already have to others β the more popular a file, the faster it downloads for everyone, since more peers are sharing pieces.
P2P is not merely "no central server". It inverts the usual relationship between popularity and performance.
The design's real problem is not technical but social: nothing forces a peer to upload, and a swarm where everyone only downloads has no capacity at all.
PiecesThe file is split into fixed-size pieces, each individually verified by hash. A peer can share pieces before holding the whole file β which is what lets capacity build immediately.
Rarest firstPeers request the piece fewest others hold, keeping every piece available and preventing the swarm dying because one piece vanished.
Tit-for-tatA peer preferentially uploads to those uploading back to it, so contributing earns faster downloads and freeloading is throttled.
TrackerHelps peers find each other. It carries no file data β losing it stops new peers joining but does not stop existing transfers.
Two prices, both examinable. Finding content is harder without a central index, so systems need trackers, distributed hash tables or flooding β each with its own trade-offs. And there is no guarantee of availability: if every peer holding a file leaves, it is simply gone, where a server keeps it as long as it runs.
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Loadingβ¦