Posts

Micronaut Framework: A Modern JVM Framework Built for Cloud-Native Applications

Table of Contents 0. Introduction 1. The Origin and History of Micronaut 2. What Is Micronaut? 3. How Micronaut Works 4. What Micronaut Brings to the Table 5. Getting Started with Micronaut 6. Micronaut vs Spring Boot 7. Micronaut vs Helidon 8. Micronaut vs Spring Boot vs Helidon: Quick Decision Matrix 9. Advantages of Micronaut 10. Limitations of Micronaut 11. When Should You Use Micronaut? 12. Conclusion   0. Introduction Java has been used for enterprise applications for decades. It powers banks, telecom platforms, e-commerce systems, backend APIs, and large distributed systems. But as the industry moved toward microservices, containers, Kubernetes, serverless platforms, and cloud-native architectures, traditional Java frameworks started facing a familiar criticism: they can be heavy at startup and memory-hungry at runtime. This is where Micronaut enters the picture. Micronaut is a modern, JVM-based framework designed for building modular, lightweight, easily testable, cloud-nat...

Proxies in System Design

In modern system design, proxy servers play a crucial role in improving performance, enhancing security, and ensuring scalability. A proxy acts as an intermediary between a client and the destination server, enabling features like load balancing, caching, anonymity, and more. Types of Proxies 1. Forward Proxy   Position: Between the client and the internet. Function: Handles requests from clients and forwards them to the appropriate server . Use Cases: Hiding client IP addresses for privacy Caching frequently accessed content Filtering requests (e.g., blocking restricted websites) How to use: Configure client to use proxy for outbound traffic. Use squid (recommended) - traditionally used as a forward proxy (and sometimes transparent proxy). It was built for caching web content and controlling outbound traffic. Script: # squid.conf http_port 3128 acl allowed_clients src 192.168.1.0/24 http_access allow allowed_clients # Optional: block certain domains acl blocked_sites dstdomain .fa...

Data Partitioning in System Design

Data Partitioning Techniques: Making Databases Scale Better As applications grow and data explodes, databases can become bottlenecks. Queries slow down, servers get overloaded, and scaling becomes a nightmare. That’s where data partitioning comes in - a smart way to split your data into manageable chunks so your system stays fast, efficient, and scalable. The most common partitioning techniques with simple examples and their benefits: 1. Horizontal Partitioning (Sharding) Description: Splitting data across multiple tables or databases based on rows. Example 1 : You run a global app with millions of users. Instead of storing all user data in one giant table, you split it by region - Asia, Europe, and America. Each shard handles users from its region, reducing load and speeding up queries. Example 2 (Layman) : Think of a library with millions of books. Instead of keeping them all in one giant hall, you split them into different buildings by genre - fiction, science, history. Each buildin...

Design Patterns

In software engineering, design patterns are tried‑and‑tested solutions to recurring problems in system design. They provide a shared vocabulary for developers and help create flexible, maintainable, and scalable applications. Broadly, design patterns fall into three categories: Creational, Structural, and Behavioral. In brief, Design Patterns are Reusable Solutions for Common Software Problems. Creational Patterns Creational patterns deal with object creation mechanisms , making systems more independent of how their objects are created.          1.  Singleton   Ensures a class has only one instance and provides a global point of access to it. Example: Logger, configuration settings.                        ```                      // Ensures only one instance of a class exists. // Useful for shared resources like l...