Design Time Tracking

Medium45 min
1 / 30
understanding6 min read

Problem Statement & Context

How Problem Statement & Context shapes architecture and interviewer follow-ups for Design Time Tracking.

Problem Statement & Context

Corporate time platforms (Toggl/Harvest class) convert work duration into billable artifacts: running timers, manual entries, weekly timesheets, manager approval, and invoice/payroll export. The hard part is concurrent RUNNING state, offline edits, and billing-grade immutability after approval.

Design checkpoint (understanding)

Anchor concepts: entry_id, timesheet_id, RUNNING lease, overlap detector, billable_seconds. Quantify Friday peak 232k heartbeats/s and 340 entry writes/s when discussing scale.

  • Note 1.1: Problem Statement & Context — edge case 1 (workspace shard 1001, heartbeat lease, overlap policy v1).
  • Note 1.2: Problem Statement & Context — edge case 2 (workspace shard 1002, heartbeat lease, overlap policy v1).
  • Note 1.3: Problem Statement & Context — edge case 3 (workspace shard 1003, heartbeat lease, overlap policy v1).
  • Note 1.4: Problem Statement & Context — edge case 4 (workspace shard 1004, heartbeat lease, overlap policy v1).
  • Note 1.5: Problem Statement & Context — edge case 5 (workspace shard 1005, heartbeat lease, overlap policy v1).
  • Note 1.6: Problem Statement & Context — edge case 6 (workspace shard 1006, heartbeat lease, overlap policy v1).
  • Note 1.7: Problem Statement & Context — edge case 7 (workspace shard 1007, heartbeat lease, overlap policy v1).
  • Note 1.8: Problem Statement & Context — edge case 8 (workspace shard 1008, heartbeat lease, overlap policy v1).
  • Note 1.9: Problem Statement & Context — edge case 9 (workspace shard 1009, heartbeat lease, overlap policy v1).
  • Note 1.10: Problem Statement & Context — edge case 10 (workspace shard 1010, heartbeat lease, overlap policy v1).
  • Note 1.11: Problem Statement & Context — edge case 11 (workspace shard 1011, heartbeat lease, overlap policy v1).
  • Note 1.12: Problem Statement & Context — edge case 12 (workspace shard 1012, heartbeat lease, overlap policy v1).
pythonOne Dark Pro
1@dataclass(frozen=True)
2class StartCommand:
3 user_id: str
4 project_id: str
5 idempotency_key: str
6
7def start_timer(cmd: StartCommand) -> str:
8 assert not repo.has_running(cmd.user_id)
9 entry = repo.insert_running(cmd)
10 lease.extend(cmd.user_id, entry.id, seconds=90)
11 return entry.id

Section 1 takeaway

Interviewers expect Problem Statement & Context to connect timer correctness, approval immutability, and billing export — not generic CRUD microservices.

Why interviewers care

Time Tracking interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.

Interview checkpoint

Name one failure story for Problem Statement & Context that proves you understand real outages, not happy-path diagrams.

Key Highlights

  • Problem Statement & Context: RUNNING lease + overlap invariants
  • Immutable approved entries; adjustment deltas only
  • Heartbeat ingest separate from OLTP submit path
  • Phase understanding checkpoint for design-time-tracking
Signal
When discussing Problem Statement & Context, cite one RUNNING timer, lease auto-stop, and timesheet immutability.
Delivery
Quantify Friday heartbeat peak (232k/s) and separate ingest SLO from submit API.

Section Rescue Kit

Buzzwords to use:

RunningLease-1OverlapGuard-1

Safe statements:

  • "I'll enforce one RUNNING timer per user unless tenant policy explicitly allows parallel."
  • "Approved timesheet rows are immutable — finance adjustments are new delta records."
Design Time Tracking - System Design | WinJob | WinJob