<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Ali Mohammad Tarif · Writing</title><description>Data structures, system design and production notes from a backend and AI engineer, taught from first principles to expert level.</description><link>https://tarif.dev/</link><language>en</language><item><title>Designing real-time chat, from first idea to production</title><link>https://tarif.dev/blog/real-time-chat-system-design/</link><guid isPermaLink="true">https://tarif.dev/blog/real-time-chat-system-design/</guid><description>How real-time chat works: polling vs WebSockets, message ordering, receipts, presence, fan-out across servers and slow readers, with live demos and real code.</description><pubDate>Fri, 30 Oct 2026 00:00:00 GMT</pubDate><category>System design</category><category>System design</category><category>WebSockets</category><category>Real-time</category><category>Redis</category><category>Python</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Heaps and priority queues, from first idea to production</title><link>https://tarif.dev/blog/heaps-priority-queues/</link><guid isPermaLink="true">https://tarif.dev/blog/heaps-priority-queues/</guid><description>How heaps and priority queues work, from ER triage to heapq, heapify, Dijkstra, timing wheels and the asyncio scheduler, with demos and production code.</description><pubDate>Tue, 27 Oct 2026 00:00:00 GMT</pubDate><category>Data structures &amp; algorithms</category><category>Data structures</category><category>Heaps</category><category>Python</category><category>Interviews</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Consistent hashing, from first idea to production</title><link>https://tarif.dev/blog/consistent-hashing/</link><guid isPermaLink="true">https://tarif.dev/blog/consistent-hashing/</guid><description>How consistent hashing works, from hash % N to rings, virtual nodes, jump hash, Maglev and Redis Cluster slots, with live demos and measured numbers.</description><pubDate>Fri, 23 Oct 2026 00:00:00 GMT</pubDate><category>System design</category><category>System design</category><category>Distributed systems</category><category>Caching</category><category>Redis</category><category>Python</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Binary search, from first idea to production</title><link>https://tarif.dev/blog/binary-search/</link><guid isPermaLink="true">https://tarif.dev/blog/binary-search/</guid><description>How binary search works, from a guessing game to bisect, answer-space search, cache-friendly layouts, B-tree indexes and git bisect, with demos.</description><pubDate>Tue, 20 Oct 2026 00:00:00 GMT</pubDate><category>Data structures &amp; algorithms</category><category>Algorithms</category><category>Binary search</category><category>Python</category><category>Interviews</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Big-O notation, from first idea to production</title><link>https://tarif.dev/blog/big-o-complexity/</link><guid isPermaLink="true">https://tarif.dev/blog/big-o-complexity/</guid><description>How to read time and space complexity, from counting loop steps to amortized analysis, query plans and N+1 bugs, with demos and production code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>Data structures &amp; algorithms</category><category>Algorithms</category><category>Complexity</category><category>Python</category><category>Interviews</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Caching, from first idea to production</title><link>https://tarif.dev/blog/caching-system-design/</link><guid isPermaLink="true">https://tarif.dev/blog/caching-system-design/</guid><description>How caching works, from TTLs and cache-aside to eviction, HTTP headers, stampedes and LLM caches, with two live simulators and real production code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>System design</category><category>System design</category><category>Caching</category><category>Redis</category><category>HTTP</category><category>Python</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Hash maps, from first idea to production</title><link>https://tarif.dev/blog/hash-maps/</link><guid isPermaLink="true">https://tarif.dev/blog/hash-maps/</guid><description>How hash maps and sets work, from a coat check to CPython&apos;s dict, Swiss tables and hash flooding, with demos, exercises and real production code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>Data structures &amp; algorithms</category><category>Data structures</category><category>Hashing</category><category>Python</category><category>Interviews</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Idempotency and safe retries, from first idea to production</title><link>https://tarif.dev/blog/idempotency-and-retries/</link><guid isPermaLink="true">https://tarif.dev/blog/idempotency-and-retries/</guid><description>Why retries double-charge and how to stop it: idempotency keys, upserts, backoff with jitter, the outbox and inbox, with live demos and real production code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>System design</category><category>System design</category><category>Idempotency</category><category>Reliability</category><category>PostgreSQL</category><category>Python</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Queues and backpressure, from first idea to production</title><link>https://tarif.dev/blog/queues-and-backpressure/</link><guid isPermaLink="true">https://tarif.dev/blog/queues-and-backpressure/</guid><description>How job queues work, from one producer and one worker to Little&apos;s Law, Celery tuning, retry storms and backpressure, with two live simulators and real code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>System design</category><category>System design</category><category>Queues</category><category>Celery</category><category>Python</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Designing a rate limiter, from first idea to production</title><link>https://tarif.dev/blog/rate-limiter-system-design/</link><guid isPermaLink="true">https://tarif.dev/blog/rate-limiter-system-design/</guid><description>How rate limiters work, from a ten-line counter to a distributed Redis design: five algorithms, a live simulator, two classic bugs and real production code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>System design</category><category>System design</category><category>Rate limiting</category><category>Redis</category><category>Python</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>The sliding window technique, from first idea to production</title><link>https://tarif.dev/blog/sliding-window/</link><guid isPermaLink="true">https://tarif.dev/blog/sliding-window/</guid><description>How the sliding window technique works, from a running sum to monotonic deques, stream windows and TCP, with step-through demos and real production code.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>Data structures &amp; algorithms</category><category>Algorithms</category><category>Sliding window</category><category>Python</category><category>Interviews</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>The two pointers technique, from first idea to production</title><link>https://tarif.dev/blog/two-pointers/</link><guid isPermaLink="true">https://tarif.dev/blog/two-pointers/</guid><description>How two pointers work, from reversing a string to Floyd&apos;s cycle detection, PostgreSQL merge joins and one-pass sync diffs, with demos and exercises.</description><pubDate>Sat, 17 Oct 2026 00:00:00 GMT</pubDate><category>Data structures &amp; algorithms</category><category>Algorithms</category><category>Two pointers</category><category>Python</category><category>Interviews</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Congestive collapse: why our API got slower the harder we pushed it</title><link>https://tarif.dev/blog/congestive-collapse-admission-control/</link><guid isPermaLink="true">https://tarif.dev/blog/congestive-collapse-admission-control/</guid><description>Throughput fell from 157.6 to 55 req/s as load rose, with zero errors. How a latency-derived concurrency limit fixed it, and where it stops helping.</description><pubDate>Fri, 16 Oct 2026 00:00:00 GMT</pubDate><category>Production notes</category><category>Scaling</category><category>Load testing</category><category>FastAPI</category><category>AWS</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>No lost turns: an AI reply pipeline that can’t silently drop a customer</title><link>https://tarif.dev/blog/no-lost-turns-ai-reply-pipeline/</link><guid isPermaLink="true">https://tarif.dev/blog/no-lost-turns-ai-reply-pipeline/</guid><description>Queues lose tasks and deploys kill workers. How an owed-reply marker, a 60-second sweeper and a sent marker make sure every customer gets an answer.</description><pubDate>Fri, 16 Oct 2026 00:00:00 GMT</pubDate><category>Production notes</category><category>Reliability</category><category>Celery</category><category>PostgreSQL</category><category>AI in production</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item><item><title>Pin your model IDs: when a “latest” alias tripled our price</title><link>https://tarif.dev/blog/pin-your-llm-model-ids/</link><guid isPermaLink="true">https://tarif.dev/blog/pin-your-llm-model-ids/</guid><description>A vendor moved a model alias and every AI feature changed model and price with no deploy. What we pin now, and why failover skips vendors without keys.</description><pubDate>Fri, 16 Oct 2026 00:00:00 GMT</pubDate><category>Production notes</category><category>AI in production</category><category>LLMOps</category><category>Reliability</category><category>Gemini</category><author>tohin.tarif@gmail.com (Ali Mohammad Tarif)</author></item></channel></rss>