WebSocket Patterns in Practice: Building Real-Time Notifications from Scratch
I needed real-time notifications and dove into WebSockets. From HTTP polling to Supabase Realtime—practical patterns for real-time communication.

Writing about development and technology.
I needed real-time notifications and dove into WebSockets. From HTTP polling to Supabase Realtime—practical patterns for real-time communication.

I was manually cleaning data every day. How I set up cron jobs and background tasks in a serverless environment to automate the boring stuff.

I couldn't understand my own API after 3 months. Practical REST API design patterns for naming, versioning, pagination, and error handling.

Every REST API I built had type mismatches between frontend and backend. tRPC eliminated the gap entirely—no API specs, no codegen, just types that flow.

My app made users wait 3 seconds after clicking 'Sign Up' just to send a welcome email. If the email server failed, the sign-up failed too. I share how I used a Message Queue (BullMQ) to decouple these processes, explained with a 'Restaurant Order Ticket' analogy.

Without a Rate Limiter, your own users can accidentally DDOS your server. I compare core algorithms like Token Bucket, Leaky Bucket, and Sliding Window, and show how to implement a distributed Rate Limiter using Redis and Lua Scripts.

Users complained about getting logged out after I scaled the servers. Here's my journey from Sticky Sessions to Redis Store, and finally to JWT.

Add one small feature and suddenly your DB CPU hits 100%. The culprit is usually the N+1 problem caused by ORM's Lazy Loading. Here's how to diagnose it, cut 1000 queries down to 1, and avoid the ORM mistakes that cause it.
