Reading Paths
Series
Curated routes through posts that belong together. Start with a series when you want context instead of a reverse chronological archive.
Kafka vs Redis Streams
Building the same stock ticker twice on real brokers: partitions, consumer groups, delivery semantics, co-partitioning, replication, stream processing, and an honest benchmark.
Kafka or Redis Streams: How to Choose
Choose between Kafka and Redis Streams by checking order, replay, recovery, capacity, and operational requirements.
Benchmarking Kafka vs Redis Streams: Throughput and Latency
My Kafka and Redis Streams tests separate throughput from latency and make the limits of a local benchmark explicit.
Building a Live Market Dashboard with SSE and Next.js
Connect a shared ticker engine to a Next.js dashboard through Server Sent Events.
Stateful Streams: Edge vs Level Triggers and OHLC Windows
Store previous prices for edge alerts and group ticks into time windows for OHLC candles.
Kafka ISR vs Redis Cluster: Replication and Failover
Stop a Kafka broker to test replica failover, then compare that behavior with Redis Cluster sharding.
Writing a Custom KafkaJS Partition Assigner for Local Joins
Assign matching partitions from two topics to the same KafkaJS consumer so it can join their records locally.
Co-Partitioning: Same Key, Same Partition, Both Topics
Matching keys, partition counts, and partitioners align records across topics, while local joins also need matching consumer assignments.
Redis Pub/Sub vs Streams: Ephemeral or Durable
Compare immediate Pub/Sub delivery with stream retention and later reads, including the limits of Redis persistence.
Exactly-Once in Kafka: Idempotent Producers and Transactions
Test producer idempotence and Kafka transactions, including which results a committed reader can see.
Redis Streams: Stuck Messages, XAUTOCLAIM, and Dead Letters
Inspect pending Redis entries, reclaim idle deliveries with XAUTOCLAIM, and handle repeated failures with a dead letter stream.
At-Least-Once in Kafka: Retries and Dead Letter Queues
Test Kafka commit timing, bounded retries, duplicate processing, and a dead letter queue.
Redis Streams Consumer Groups: Competing Consumers and PEL
Use XREADGROUP, the Pending Entries List, and XACK to distribute Redis stream entries and track incomplete work.
Kafka Consumer Groups: Lag, Draining, and Rebalancing
Observe partition assignments, consumer lag, and rebalancing as members join a Kafka group.
Redis Streams Fundamentals: XADD, Entry IDs, and MAXLEN
Use XADD, entry IDs, stream keys, and MAXLEN to write, read, and retain Redis stream data.
Kafka Partitions and Keys: Keeping Symbols in Order
Test how Kafka keys select partitions and preserve each symbol's append order.
Kafka vs Redis Streams: Building a Stock Ticker Twice
I built a stock ticker with Kafka and Redis Streams to compare ordering, recovery, and local joins against real brokers.
Crypto: age
Opening one small age file layer by layer: the passphrase header, scrypt, ChaCha20-Poly1305, key pairs, and a measured look at how long a brute-force attack takes.
[Crypto: age] How Long Does a Passphrase Attack Take?
Calculate age passphrase attack times, understand the assumptions, and see why random selection matters more than password length alone.
[Crypto: age] Passphrase or Key Pair
Compare a passphrase with an age key pair, make your own keys, and encrypt one file for two recipients.
[Crypto: age] ChaCha20-Poly1305, Sealing the Body
Learn how age encrypts file contents, what an authentication tag checks, and what happens when one byte changes.
[Crypto: age] scrypt, From Password to Key
Learn how scrypt derives an age wrapping key, why each attempt uses time and memory, and what a slow calculation cannot prevent.
[Crypto: age] Reading the Header
Read an age file header one field at a time, with simple definitions for the salt, encrypted file key, and authentication code.
[Crypto: age] From Password to Ciphertext
A first file encryption example with age, from readable text to an encrypted file and back, with instructions for each command.
Backend Systems and Architecture
Queues, caching, locks, APIs, and the tradeoffs that show up when systems carry real traffic.
Kafka or Redis Streams: How to Choose
Choose between Kafka and Redis Streams by checking order, replay, recovery, capacity, and operational requirements.
Benchmarking Kafka vs Redis Streams: Throughput and Latency
My Kafka and Redis Streams tests separate throughput from latency and make the limits of a local benchmark explicit.
Building a Live Market Dashboard with SSE and Next.js
Connect a shared ticker engine to a Next.js dashboard through Server Sent Events.
Stateful Streams: Edge vs Level Triggers and OHLC Windows
Store previous prices for edge alerts and group ticks into time windows for OHLC candles.
Kafka ISR vs Redis Cluster: Replication and Failover
Stop a Kafka broker to test replica failover, then compare that behavior with Redis Cluster sharding.
Writing a Custom KafkaJS Partition Assigner for Local Joins
Assign matching partitions from two topics to the same KafkaJS consumer so it can join their records locally.
Co-Partitioning: Same Key, Same Partition, Both Topics
Matching keys, partition counts, and partitioners align records across topics, while local joins also need matching consumer assignments.
Redis Pub/Sub vs Streams: Ephemeral or Durable
Compare immediate Pub/Sub delivery with stream retention and later reads, including the limits of Redis persistence.
Exactly-Once in Kafka: Idempotent Producers and Transactions
Test producer idempotence and Kafka transactions, including which results a committed reader can see.
Redis Streams: Stuck Messages, XAUTOCLAIM, and Dead Letters
Inspect pending Redis entries, reclaim idle deliveries with XAUTOCLAIM, and handle repeated failures with a dead letter stream.
At-Least-Once in Kafka: Retries and Dead Letter Queues
Test Kafka commit timing, bounded retries, duplicate processing, and a dead letter queue.
Redis Streams Consumer Groups: Competing Consumers and PEL
Use XREADGROUP, the Pending Entries List, and XACK to distribute Redis stream entries and track incomplete work.
Kafka Consumer Groups: Lag, Draining, and Rebalancing
Observe partition assignments, consumer lag, and rebalancing as members join a Kafka group.
Redis Streams Fundamentals: XADD, Entry IDs, and MAXLEN
Use XADD, entry IDs, stream keys, and MAXLEN to write, read, and retain Redis stream data.
Kafka Partitions and Keys: Keeping Symbols in Order
Test how Kafka keys select partitions and preserve each symbol's append order.
Kafka vs Redis Streams: Building a Stock Ticker Twice
I built a stock ticker with Kafka and Redis Streams to compare ordering, recovery, and local joins against real brokers.
Choosing the Right Queue System
Compare job queues, message brokers, event logs, and workflow engines by their delivery and recovery requirements.
Caching Strategies: Cache-Aside to Write-Behind
Compare cache patterns by their read path, write path, failure behavior, and risk of stale data.
PostgreSQL Advisory Locks: What They Do and When to Use Them
Use PostgreSQL advisory locks to coordinate application work, with explicit choices about ownership and lock lifetime.
PgBoss vs BullMQ: Job Queue Architectures Under the Hood
Compare how PgBoss and BullMQ store, claim, complete, and recover background jobs.
API Design: Design-First vs Code-First
Compare writing an API contract before implementation with deriving the contract from code.
Welcome to My New Blog: Migrating from WordPress to Next.js
I moved this blog from WordPress to Next.js to control its design, content, and performance.
Leetcode - Logger Rate Limiter Solution
Track the last printed timestamp for each message to enforce a ten second logging interval.
SOLID: Good OOP Principles
Examples of the five SOLID principles and the design problems each one addresses.
Algorithm Patterns
Problem solving patterns from LeetCode, grouped around arrays, linked lists, heaps, stacks, and pointers.
Leetcode - Merge k Sorted Lists Solution
Compare sequential, pairwise, and heap methods for merging sorted linked lists.
Leetcode - N-Queens II Solution
Count valid queen arrangements with backtracking, column checks, and diagonal masks.
Leetcode - Valid Number Solution
Compare a regular expression, explicit parsing, a state machine, and boolean flags for validating numeric strings.
Leetcode - Rotate Array Solution
Rotate an array to the right with three reversals and constant extra space.
Leetcode - N-Queens Solution
Use backtracking to find chessboard arrangements where no two queens attack each other.
Understanding Priority Queue (Min-Heap)
Build a min heap and use it to insert items and remove the smallest item by priority.
Leetcode - Candy Solution
Use two passes to assign candies while satisfying each child's comparisons with neighboring ratings.
Leetcode - Best Time to Buy and Sell Stock II Solution
Add each positive price change to find the maximum profit from unlimited stock transactions.
Leetcode - Best Time to Buy and Sell Stock Solution
Track the lowest price seen so far to find the best profit from one stock transaction.
Leetcode - Reverse Linked List Solution
Compare rebuilding a linked list with reversing its existing links in constant extra space.
Introduction to In-Place Manipulation of a Linked List
Reverse a linked list by changing its links while preserving access to the remaining nodes.
Introduction to Priority Queue
A priority queue selects the next item by priority, with heaps as a common implementation.
Leetcode - Container With Most Water Solution
Move two pointers toward each other to find the largest container area in linear time.
Leetcode - Trapping Rain Water Solution
Calculate trapped water from the highest bars on each side, then reduce extra storage with two pointers.
Leetcode - Palindrome Permutation Solution
Count character frequencies to check whether a string has a palindrome permutation.
Introduction to Knowing What to Track
Choose the state an algorithm needs, such as counts, visited values, or the best result so far.
Leetcode - Logger Rate Limiter Solution
Track the last printed timestamp for each message to enforce a ten second logging interval.
Leetcode - Design HashMap Solution
Build a HashMap with buckets and handle collisions through separate chaining.
Introduction to Hash Map
A hash map stores key and value pairs for lookup, insertion, and deletion.
Leetcode - Implement Queue Using Stacks Solution
Use two stacks to preserve queue order and make each operation amortized constant time.
Leetcode - Remove All Adjacent Duplicates In String Solution
Use a stack to remove adjacent duplicate pairs, including pairs created by earlier removals.
Introduction to Stacks
A stack removes the most recently added item first, which helps with matching, reversal, and nested operations.
Leetcode - Linked List Cycle Solution
Compare a visited node set with Floyd's algorithm for detecting cycles in a linked list.
Leetcode - Happy Number Solution
Use cycle detection to check whether repeated sums of squared digits reach 1.
Fast and Slow Pointers
Use two pointers with different speeds to detect cycles without a collection of visited nodes.
Leetcode - Sum of Three Values Solution
Sort the array, fix one value, and use two pointers to find three values with the target sum.
Leetcode - Valid Palindrome Solution
Compare characters from both ends while skipping punctuation and ignoring letter case.
Introduction to Two Pointers
Use two array positions to reduce repeated searches when the input structure permits it.
Career, Resilience, and Work
Personal posts about hard seasons, growth, team fit, leadership, and rebuilding after setbacks.
Four Years at Xendit, and a Mutual Termination Agreement
I'm leaving Xendit via a Mutual Termination Agreement. The honest version of what happened, what I built, and what comes next.
With Hardship Comes Ease
A quieter reflection on Quran 94:5, a heavy week, and trying to trust that hardship will not last forever.
Code, Diapers, and Deadlines
Becoming a father while carrying a difficult software project taught me how fragile focus can be, and how much support matters.
Life, Love, and Music
Older personal writing about music, relationships, family, and the emotions that shaped the person behind the work.
With Hardship Comes Ease
A quieter reflection on Quran 94:5, a heavy week, and trying to trust that hardship will not last forever.
Code, Diapers, and Deadlines
Becoming a father while carrying a difficult software project taught me how fragile focus can be, and how much support matters.
Love is Dead
A poetic reflection on the painful reality of loving someone who can never love you back
You Will Never Know How Much You Mean To Me
If I could tell you how much you mean to me in words, I would say I love you
Fake Happy, eh?
Paramore's Fake Happy reminds me how often I hide difficult feelings behind a smile.