Engineering Insights.Shared for Growth.

In-depth articles, tutorials and insights on system design, architecture, coding and everything in between.

System Design: Designing a Financial Ledger with Double-Entry Constraints
Featured

System Design: Designing a Financial Ledger with Double-Entry Constraints

TLDR: Designing a financial ledger requires strict double-entry compliance, high consistency, and complete auditability. Unlike traditional databases where records are updated in-place, a financial le

System DesignFinanceArchitecture
Jun 18, 202613 min read11 views
PagedAttention & KV-Cache Optimization: How vLLM Handles Large Scale Inference

PagedAttention & KV-Cache Optimization: How vLLM Handles Large Scale Inference

TLDR: Large Language Model (LLM) serving is heavily bound by GPU memory capacity due to the Key-Value (KV) cache. Traditional serving frameworks allocate contiguous memory based on maximum sequence le

LlmMachine LearningSystem Design
Jun 18, 202614 min read7 views
CPython Internals: Reference Counting, Cycle Detection, and Memory Profiling

CPython Internals: Reference Counting, Cycle Detection, and Memory Profiling

TLDR: CPython manages memory using a two-tier system: Reference Counting (for immediate deallocation) and a Generational Cyclic Garbage Collector (to identify and collect isolated reference cycles). T

PythonGeneral ProgrammingInternals
Jun 18, 202611 min read2 views
Concurrency Models: Actor Model vs. Communicating Sequential Processes (CSP)

Concurrency Models: Actor Model vs. Communicating Sequential Processes (CSP)

TLDR: Shared-memory multithreading using manual locks is notoriously difficult to scale and debug. To avoid race conditions and deadlocks, modern platforms use message-passing concurrency models. This

JavaConcurrencyMultithreading
Jun 18, 202610 min read5 views
Spark 101: Installing, Configuring, and Running Your First PySpark App Locally

Spark 101: Installing, Configuring, and Running Your First PySpark App Locally

TLDR: Learning Apache Spark usually starts with understanding how to set up a local development environment. This guide outlines the differences between local and cluster execution modes, details how

Python#apache SparkBig Data
Jun 18, 20269 min read3 views
Deep Learning Optimizers: Deriving Momentum, RMSProp, and AdamW mathematically

Deep Learning Optimizers: Deriving Momentum, RMSProp, and AdamW mathematically

TLDR: Optimizers determine how we update neural network weights during training. While Stochastic Gradient Descent (SGD) updates parameters along the negative gradient direction, modern models use ada

PythonMachine LearningDeep Learning
Jun 18, 202611 min read
Cell-Based Architectures: Designing Fault Isolation Boundaries for Million-User Apps

Cell-Based Architectures: Designing Fault Isolation Boundaries for Million-User Apps

TLDR: As microservice architectures scale, a single outage in a core service can cascade across the entire system. Cell-Based Architecture mitigates this by partitioning the entire system into small,

JavaSpring BootCloud Native
Jun 18, 202610 min read
Tarjan’s Algorithm: Finding Strongly Connected Components (SCC) step-by-step

Tarjan’s Algorithm: Finding Strongly Connected Components (SCC) step-by-step

TLDR: In directed graphs, a Strongly Connected Component (SCC) is a maximal subset of vertices where every vertex is reachable from any other vertex in the subset. Finding these components is crucial

JavaDsaAlgorithms
Jun 18, 202611 min read
Python Metaprogramming: Creating Custom Metaclasses and Attribute Descriptors

Python Metaprogramming: Creating Custom Metaclasses and Attribute Descriptors

TLDR: Metaprogramming is the art of writing code that manipulates, generates, or validates other code at runtime. In Python, this is achieved using Metaclasses (which customize class creation) and Des

PythonGeneral ProgrammingOop
Jun 18, 202611 min read
…