Category: architecture

MVC Explained

MVC is an architecture to separate an application in three cohesive, loosely coupled verticals. Model: The data of your application and methods to access it. View: The final output/expected result. Controller: The interface that handles requests from the model I’m trying to map it to a Linux Filesystem (e.g. ext2). Model: The file system block manager and allocator for the…

Guidelines for a System Architect

The system architect is key personnel to enable the success of an organization. From the book, Building Microservices, I learned the following worth highlighting nuggets: An architect defines the technical vision of an organization. This vision is compatible with the strategic goals (e.g. expanding markets, market segments, etc) of the company. Taking an example of a town planner, an architect…

Lambda Architecture & Heavy Hitters

I came across an interesting video on Finding top K heavy hitters. The solution with Lambda Architecture seems intriguing. Things to Note Lambda Architecture uses a fast path and a slow path. Slow path is used for batch processing. Fast path is used for in-memory processing. Variation Most treding products Most traded stocks DDoS References https://www.codeproject.com/Articles/1171443/Applying-Lambda-Architecture-on-Azure https://www.youtube.com/watch?v=kx-XDoPjoHw Written with StackEdit.

Architecture Pattern: CQRS

Command and Query Responsibility Segregation provides excellent decoupling for shared data at a nominal price of higher latency for latest data. It fits very well in micro service architecture for cases of data sharing among services where one service is a reader and another a writer. Implementation Suppose there are two serviceA & B that need to share a database.…

Design Problems of PostGres- Part II

The problems in PostGres DB are solved in MySQL to an extent. The design merits of MySQL are the following: The primary index has a mapping of key to an offset in the disk. But all secondary index tables have a mapping of key to the primary index’s key. Primary index ——————– | key | Disk offset| ——————– Secondary index…

Design Problems of PostGres- Part I

This post is a quick summary of Why Uber moved from PostGres to MySQL. PostGres Rows and CTID PostGres provides transactions. Transactions need multiple versions of data. So PG is Multi Versioned DB. PG considers each row immutable. Any change to a row creates a new row version. A row is represented as an offset in disk, called ctid Every…