Design (LLD) a peer-to-peer file sharing system like BitTorrent - Machine CodingSubhahu Jain·Jul 15, 2023·6 min readTable of contentsIssues in above design🔥 Problem 1: Peer Is a God Object❌ What we Did❌ Why This Is a Serious Design SmellSolution🔥 Problem 2: No Peer Discovery Model Exists❌ Claimed Feature❌ Actual CodeSolution🔥 Problem 3: Chunk Data Stored in Memory (Huge Red Flag)❌ What we Did❌ Why This Is DangerousSolution🔥 Problem 4: Rarest-First Strategy Is Not Implementable Here❌ What we Wrote❌ Why This Is Fundamentally WrongSolution🔥 Problem 5: No Integrity Verification Model❌ Claimed Feature❌ Missing RealitySolution🔥 Problem 6: Concurrency Is Claimed but Not Designed❌ What we Claimed❌ What You Actually DidSolution🔥 Problem 7: No Bandwidth Management Exists❌ Claimed Feature❌ Missing EntirelySolution🔥 Problem 8: Observer Pattern Is Misleading Here❌ What we Claimed❌ Why This Is DangerousSolution🔥 Problem 9: No Separation Between Control Plane & Data Plane❌ What we ModeledSolutionProgramming BlogsJavaScriptJavaPythonBeginner Developers