Design a basic task management system
Company: Amazon
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
Design a simple task management system that supports:
(
1) Add a new task with a unique ID and description,
(
2) Mark a task as completed by ID,
(
3) Get all incomplete tasks,
(
4) Get all completed tasks, and
(
5) Get a task by ID. Specify the data model and core APIs/classes, choose in-memory vs. persistent storage, and describe how you'd ensure thread safety and consistency. Discuss ID generation strategies (auto-increment, UUID, or timestamp plus attributes hash) and their trade-offs (ordering, collisions, sharding). Outline performance considerations and a brief testing strategy.
Quick Answer: This question evaluates a candidate's ability to design a simple task management service, covering competencies in data modeling, API and class design, storage selection, concurrency and consistency control, ID generation strategies, performance considerations (indexing, pagination), and testing approaches.