Importance of S.O.L.I.D principles
As developers, we have always dealt with legacy codebases. Most of the legacy codebases have tightly coupled classes, redundant code, and less test coverage. This gives a developer a hard time to comprehend the functionality of a codebase when giving a quick glance at the code.
Imagine the pain of going through endless lines of code in a class to only fix a bug. The developer might end up reading more lines of code than writing. Further, fixing one flow might result in breaking the other. This reminds me of the below famous meme.
Single processor systems dominated during the early days of computing. The synchronous programming model was adopted in many early programming languages. With the advancements in hardware, there was a need to develop better programming models. A robust model that would fully utilize all the resources would be the most suitable one. This gave birth to Asynchronous programming.
For beginners, it’s difficult to understand the difference between the two programming models. In this write-up, I’ll attempt to simplify & explain the difference in layman terms. We will also take a look at a simple illustration in Java. …
In today’s world, data is growing at an enormous rate. Enterprises have built innovative solutions to handle a humongous amount of data. It’s not uncommon to see data distributed across many machines or databases. This technique is known as ‘Sharding’, helps in building scalable & reliable systems.
Tech companies also are adopting a microservices architecture. In this type of architecture, every microservice manages its own database. To add or modify data in a different database, it calls the responsible microservice.
Distributing data across many machines comes up with its own set of challenges. Data management for a monolithic non-sharded system…
Containers have seen widespread adoption across the Tech industry. Almost every company has started adopting containers for deploying microservices. Container orchestration technology such as Kubernetes(K8) has simplified the management of containers. Companies using Kubernetes have observed improvements in scalability, reliability & operability of their systems.
Implementation & Illustration of the Observer design pattern
Real-world software systems rely heavily on events. Any state change occurring in the system comprises an event. Whenever you purchase anything online, you get an email notification. Similarly, your Bank may send you a text message about a successful transaction. As customers, we have different modes of consuming these events viz Computers, Mobile Devices, Wearables, etc. Billions of such events take place throughout the world in a fraction of a second.
The Observer design pattern is modeled on the event-driven programming paradigm. Just like other design patterns, this pattern lets us define…
Fundamentals of Kafka
Kafka has revolutionised the processing of events stream in distributed computing. Before the advent of Kafka, the industry employed message queues and publisher-subscriber systems. Both these systems had their limitations in scalability and performance. Kafka took the best of both the world from the two systems. Thus, delivering a scalable, highly-available, distributed commit log.
There is a common misconception that Kafka acts as a message queue. However, the semantics of message queue is different than that of Kafka. In essence, Kafka is a distributed commit log. It’s a highly available, scalable & a fault-tolerant system. …
High-level Design of URL Shortner
System design Interview problems are intentionally open-ended. It gives an interviewer opportunity to evaluate design skills and also the depth of technical concepts. Day-to-day engineering work involves architecting a lot many scalable systems. This interview provides a platform to judge a candidate’s problem-solving & communication skills as well.
It’s difficult to nail a System Design round without sufficient preparation & practice. Also, it’s intimidating for candidates who don’t have a background in Distributed Systems. At times, interviewees seem to lose their focus & deviate from the topic if they don’t follow a structured methodology.
Elliptic Curve Cryptography in simple words
In the past century, the world has seen unprecedented progress in the field of Cryptography, & Computer Security. In today’s world, all electronic devices use cryptography for secure communication. We have come a long way since the WW2 days when Nazis used the Enigma machine for military communication. With the world gravitating towards quantum supremacy, encryption might become a thing of past.
In this article, we will have a look at the fundamentals of Elliptic Curve Cryptography (ECC). This article will touch upon the high-level working of ECC without delving into the mathematical details…
Introduction, use cases, strategies, and policies to cache data
Have you ever noticed if you are on a slow internet connection and browsing a website, the text is loaded before any high-quality image? However, in your subsequent visits to the same website, you will observe that page rendering occurs quickly. When you visit a brand new website, it takes more time to load than frequently visited sites like Facebook or Amazon. Do you know why this happens? The answer is Caching.
Consistent Hashing illustrated in simple words
Imagine you are designing a scalable backend for an e-commerce website like Amazon. The amount of data volume will be humongous and exponentially rising every year. Do you think you will be able to store & manage the data on a single server? The answer is No.
When your data can’t fit on a single machine, you will have to spin up more machines. One of the most significant design objectives would be to efficiently distribute the data among the servers. …