Design a Nested Comments System

0%

Editorial Solution

System requirements

Functional

Capacity estimation

Traffic

API design

Create Comment

Database design

PostgreSQL with Materialized Path

High-level design

Request flows

Post Reply Flow

Detailed component design

Comment Tree Retrieval with Materialized Path

Tradeoffs

Adjacency List vs. Materialized Path vs. Closure Table

Failure scenarios

Comment Deleted but Replies Exist

Future improvements

Content Moderation and Spam Filtering

Table of Contents

System requirements

Functional

Capacity estimation

Traffic

API design

Create Comment

Database design

PostgreSQL with Materialized Path

High-level design

Request flows

Post Reply Flow

Detailed component design

Comment Tree Retrieval with Materialized Path

Tradeoffs

Adjacency List vs. Materialized Path vs. Closure Table

Failure scenarios

Comment Deleted but Replies Exist

Future improvements

Content Moderation and Spam Filtering

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock
Try this problem yourself

Reading a solution is not the same as producing one under interview pressure. Design it on the whiteboard and get scored feedback.


Markdown supported

0%

Editorial Solution

System requirements

Functional

Capacity estimation

Traffic

API design

Create Comment

Database design

PostgreSQL with Materialized Path

High-level design

Request flows

Post Reply Flow

Detailed component design

Comment Tree Retrieval with Materialized Path

Tradeoffs

Adjacency List vs. Materialized Path vs. Closure Table

Failure scenarios

Comment Deleted but Replies Exist

Future improvements

Content Moderation and Spam Filtering

Table of Contents

System requirements

Functional

Capacity estimation

Traffic

API design

Create Comment

Database design

PostgreSQL with Materialized Path

High-level design

Request flows

Post Reply Flow

Detailed component design

Comment Tree Retrieval with Materialized Path

Tradeoffs

Adjacency List vs. Materialized Path vs. Closure Table

Failure scenarios

Comment Deleted but Replies Exist

Future improvements

Content Moderation and Spam Filtering