Back to Projects

03 / Project

nCAKES — P2P Video Streaming System

BitTorrent-inspired peer-to-peer video chunk streaming over TCP/IP

ncakes-p2p.stack

The Problem

Centralized video delivery is expensive and bottlenecked. A peer-to-peer approach distributes load across the swarm instead of a single server.

What I Built

A custom socket-based communication layer with an application-layer protocol using JSON-format control, request, and response messages for tracker-peer and peer-peer messaging. Deployed on Linux with ffmpeg.

Approach

A tracker coordinates which peers hold which video chunks. Peers negotiate and exchange chunks directly over TCP/IP sockets using a hand-rolled JSON protocol, then reassemble and play the stream with ffmpeg.