System Design Round Simulations

0/3 in this phase0/52 across the roadmap

📖 Concept

System design simulation — practice designing complete mobile systems in 45 minutes. Focus on Android-specific considerations.

What Google evaluates in system design:

1. Requirements Gathering (15%):
   - Asks right clarifying questions
   - Defines scope appropriately
   - Identifies key constraints (offline, scale, latency)

2. High-Level Design (25%):
   - Clean architecture diagram
   - Appropriate component choices
   - Clear data flow

3. Detailed Design (30%):
   - Deep dive into key components
   - Data model design
   - API design
   - Algorithm choices

4. Trade-offs & Discussion (20%):
   - Discusses alternatives
   - Explains why choices were made
   - Addresses failure modes

5. Android-Specific (10%):
   - Process death handling
   - Battery/performance considerations
   - Lifecycle awareness
   - Offline support

5 practice scenarios:

Scenario 1: Design a Photo Gallery App (Google Photos)

  • Cloud sync, offline browsing, sharing
  • Large image handling, thumbnails
  • Search by person/object (ML)

Scenario 2: Design a Ride-Sharing App (Uber)

  • Real-time driver tracking
  • Ride matching algorithm
  • ETA calculation
  • Payment processing

Scenario 3: Design an Offline-First Document Editor

  • Real-time collaboration
  • Conflict resolution
  • Auto-save and versioning

Scenario 4: Design a Social Media Feed

  • Infinite scroll pagination
  • Real-time updates
  • Image/video handling
  • Push notifications

Scenario 5: Design a Chat Application (WhatsApp)

  • End-to-end encryption
  • Message delivery states
  • Media sharing
  • Group chat

💻 Code Example

codeTap to expand ⛶
1// System Design Template: Photo Gallery with Cloud Sync
2
3/*
4STEP 1: REQUIREMENTS (5 min)
5━━━━━━━━━━━━━━━━━━━━━━━━━━━
6Functional:
7 - Browse photos (grid view, full screen)
8 - Take photos with camera
9 - Auto-sync to cloud
10 - Share photos/albums with others
11 - Search by date, location, people
12 - Offline browsing of previously viewed photos
13Non-functional:
14 - <100ms for local photo display
15 - Auto-sync within 5 min on WiFi
16 - Handle 10,000+ photos per user
17 - Minimal battery impact from sync
18
19STEP 2: HIGH-LEVEL ARCHITECTURE (5 min)
20━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
21┌────────────────────────────────────────┐
22│ UI Layer (Compose) │
23│ ├── PhotoGridScreen (LazyGrid) │
24│ ├── PhotoDetailScreen (Zoomable) │
25│ └── AlbumScreen │
26│ ↕ │
27│ ViewModel + Paging 3 │
28│ ↕ │
29│ PhotoRepository │
30│ ↕ ↕ ↕ │
31│ Room DB SyncEngine ImageLoader │
32│ (metadata) (WorkManager) (Coil) │
33│ ↕ ↕ │
34│ File System Backend API │
35│ (full/thumb) │
36└────────────────────────────────────────┘
37
38STEP 3: DATA MODEL (5 min)
39━━━━━━━━━━━━━━━━━━━━━━━━━
40Photo entity:
41 - id (UUID)
42 - localPath (String?)
43 - remotePath (String?)
44 - thumbnailPath (String?)
45 - dateTaken (Long)
46 - location (lat/lng?)
47 - width, height (Int)
48 - syncState (SYNCED | PENDING | UPLOADING | FAILED)
49 - fileSize (Long)
50
51STEP 4: KEY COMPONENTS DEEP DIVE (15 min)
52━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
53Image Loading:
54 - Coil with 3 layers: memory cache → disk cache → network
55 - Generate thumbnails on capture (200x200)
56 - Load full resolution only on detail view
57 - Recycle bitmap memory when scrolling
58
59Sync Engine:
60 - WorkManager with UNMETERED + NOT_LOW_BATTERY constraints
61 - Upload queue: new photos added to pending table
62 - Upload process: compress → upload → update syncState
63 - Delta sync: fetch new photos from server since lastSyncToken
64 - Conflict: server version wins (photos are immutable after capture)
65
66Pagination:
67 - Room PagingSource for local photos (date descending)
68 - RemoteMediator for cloud photos (lazy download)
69
70STEP 5: TRADE-OFFS (5 min)
71━━━━━━━━━━━━━━━━━━━━━━━━━
72- Full vs compressed sync: upload original + generate cloud thumbnails
73 vs upload compressed only → chose original for quality
74- Sync immediately vs batched: batched saves battery, slight delay ok
75- Room metadata vs file-based: Room for fast queries, files for images
76*/

🏋️ Practice Exercise

System Design Practice (45 min timer for each):

Practice 1: Design Google Maps Navigation Requirements: Turn-by-turn navigation, real-time traffic, offline maps, ETA updates, re-routing. Focus on: Location tracking, map tile caching, real-time updates.

Practice 2: Design YouTube Mobile Requirements: Video feed, autoplay, offline downloads, picture-in-picture, recommendations. Focus on: Video streaming, caching, bandwidth adaptation.

Practice 3: Design a Banking App Requirements: Account overview, transfers, bill pay, biometric auth, transaction history. Focus on: Security, encryption, offline transactions.

Self-evaluation rubric: □ Gathered requirements in < 5 min □ Drew a clear architecture diagram □ Defined data models □ Discussed at least 2 trade-offs □ Addressed offline support □ Considered battery/performance □ Stayed within 45 min

⚠️ Common Mistakes

  • Spending too long on requirements — 5 minutes max, then move to design

  • Not drawing a diagram — visual architecture is essential for communication

  • Designing only the backend — Google wants to see your Android architecture expertise

  • Not discussing trade-offs — the choice is less important than showing you considered alternatives

💼 Interview Questions

🎤 Mock Interview

Mock interview is powered by AI for System Design Round Simulations. Login to unlock this feature.