Skip to content
Jarviix

60-day SSE plan · Day 2 of 60

Rate Limiter (Token Bucket) • WhatsApp-like Chat • Binary Search on Answer • Tech: Advanced Java

Day2

60-day SSE plan

Rate Limiter (Token Bucket) • WhatsApp-like Chat • Binary Search on Answer • Tech: Advanced Java

Algorithm

DSA

Easy–Medium

Binary Search on Answer — Capacity to Ship Packages (LC 1011)

Minimize ship capacity so all packages ship within D days using feasibility check.

Example

Input: weights=[1,2,3,1,1], D=4 → Output: 3

Where it shows up

Capacity planning, throughput sizing, SLO budgeting.

Low-level design

LLD

Rate Limiter (Token Bucket)

Requirements

  • Per-user limits with rate & capacity.
  • Thread-safe tryAcquire(); refill over time.

Expectations

  • UML for TokenBucket & RateLimiterService.
  • Concurrency-safe Java implementation + tests.

Where it shows up

API gateways, throttling abusive clients.

High-level design

HLD

WhatsApp-like Chat

Requirements

  • 1:1 + group messaging, delivery/read receipts, offline sync.
  • Real-time delivery via WebSockets; scalable fan-out.

Expectations

  • APIs, WebSocket fan-out, message broker, storage model.
  • Multi-region strategy, exactly-once UX via idempotency keys.

Where it shows up

Consumer chat apps, support chat in products.

Today's deep-dive

Tech

Advanced Java

Explore JVM memory (heap, metaspace), class loading, JIT; write a micro-benchmark of String vs StringBuilder concatenation.

Where it shows up

Performance tuning in enterprise Java apps, optimizing backend services, and understanding memory/CPU trade-offs in production systems.