Skip to main content

Getting Ready: File Storage System

Why This Problem Matters

File storage systems are the backbone of modern cloud computing. Products like Dropbox, Google Drive, and OneDrive manage billions of files for millions of users, supporting everything from personal photos to enterprise documents.

Designing such a system is a favorite interview topic because it tests your ability to model hierarchical data, enforce permissions, handle large files, and think about scalability and extensibility.

The engineering challenges are immense: how do you efficiently store and retrieve files of any size, support instant sharing and collaboration, deduplicate data, and keep everything secure? The object model you design here is the foundation for all these capabilities.

What You'll Learn

  • Model a hierarchical file/folder tree using the Composite Pattern
  • Design a flexible permissions system (users, groups, access levels)
  • Apply the Proxy Pattern for lazy loading and access control
  • Implement chunked uploads and deduplication
  • Create UML diagrams: Class, Use Case, Sequence (upload/download)
  • Write Python and Java code for core classes (File, Folder, Permission, StorageService)

Prerequisites

Before starting this problem, make sure you're comfortable with:

  • OOP Relationships — especially Composition and Association (Fundamentals S4)
  • Composite Pattern — modeling tree structures (Fundamentals S11)
  • Proxy Pattern — controlling access and lazy loading (Fundamentals S11)
  • UML Class & Sequence Diagrams — how to read and interpret them (Fundamentals S5)

Problem Scope

We will design: The core domain logic — classes for files, folders, permissions, chunked storage, and upload/download flows.

We will NOT design: Database schemas, REST APIs, distributed file systems, or UI/frontend. This is a Low Level Design (object-oriented) exercise, not a System Design (infrastructure) problem.