Skip to content
Jarviix

60-day SSE plan · Day 12 of 60

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

Day12

60-day SSE plan

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

Algorithm

DSA

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

Spring Boot

Create Orders API with validation and @ControllerAdvice; profiles dev/test; write slice tests.

Where it shows up

Building production-grade Java microservices, rapid prototyping, and enterprise backend development with robust configuration and testing support.