-
Continue reading →: Difference between wait() and notify() in JavaTo begin, the wait() and notify() methods belong to the Object class in Java. This is to replaces the need to poll conditions repeatedly until they meet consensus – the problem with this is that it eats a lot of CPU resources. So what do they do? Let’s answer that…
-
Continue reading →: Difference between HashMap and HashTable in Java?Let’s begin with the similarities of HashMap and HashTable: HashMap vs HashTable HashMap HashTable HashMap Example import java.util.HashMap; public class HashMapExample { public static void main(String[] args) { HashMap<String, Integer> map = new HashMap<>(); map.put(“apple”, 5); map.put(“banana”, 3); map.put(“orange”, 10); int value = map.get(“banana”); System.out.println(value); // Output: 3 map.remove(“orange”); map.put(“orange”,…
-
Continue reading →: Difference between ArrayList and LinkedList in Java?An ArrayList and a LinkedList are both data structures used to store a collection of elements, but they have some key differences in terms of their implementation and performance. ArrayList LinkedList Implemented as a dynamic array Implemented as a doubly-linked list Fast random access to elements by index Fast insertion…
-
Continue reading →: Difference between Runnable and Callable Interface in Java?Runnable Callable Defines a task that can be executed by a thread Similar to Runnable, but it is intended to yield a value. Contains one method run() which holds the logic that will be executed by the thread Contains one method call() which holds the logic that will be executed…
-
Continue reading →: Difference between extends Thread vs Runnable in Java?In Java there are two means to generate new “thread of execution”. We will divide and label these two approach Thread and Runnable. Thread Example? Runnable Example? Comparison between Thread and Runnable? Thread Runnable Each thread creates a unique object and get associated with it 🤔 Multiple threads share the…
-
Continue reading →: Difference between String, StringBuffer and StringBuilder in Java?String is one of the most used classes in Java! Both StringBuffer and StringBuilder classes provided methods to manipulate Strings. To understand the difference we will explore and compare these classes in Java and when it is best to use them. String vs StringBuffer vs StringBuilder mutability? String vs StringBuffer…
-
Continue reading →: Databases – Single-Object WritesAtomicity in isolation also applies when a single object is being changed. For example consider the problem you stumble upon when writing a 20kb JSON document to a database: These updates would be quite confusing 🤷♂️ Storage engines and single object operations So storage engines almost universally aim to provide…
-
Continue reading →: Databases – Multi-Object OperationsAs per the previous post on What is the meaning of ACID in Databases?, Atomicity and Isolation describe what a database should do if a client makes several writes within the same transaction… What does Atomicity mean? Atomicity means if an error occurs, half way through a sequence of writes the…
-
Continue reading →: Distributed databases – Is Performance, Scalability and Transactional Guarantees Achievable?Almost every relational databases today and a few none relational databases support transactions… Most follow the protocols that were introduced in 1975! Although some implementation details have changed, the general technical patterns here have remained the dame for over 40 years! Systems that are similar to R, that have transaction…
-
Continue reading →: What is the meaning of ACID in Databases?The safety guarantees provided by transactions are often described by the well known acronym ACID. What does ACID stand for? Where does it come from? In 1983 both Andreas Reuter and Theo Härder, outlined these properties to create clarification for what a fault tolerance mechanism is for databases. The truth of ACID…
-
Continue reading →: Do we take Transactions for granted?Transaction are often something we take for granted as developers, when we decide what applications we want to build. The mechanism of a transaction is important to understand, as we also need to know when it is appropriate to use them! In this blog post I will summarise transactions and…
-
Continue reading →: How to understand Apache KafkaThe awesome open source Apache Kafka, which currently meets the demands of todays technological landscape, enabling event stream processing, real-time data pipelines, and data integration at scale. ⭐️ Kafka GitHub Repo Where did it come from? This was originally created to process the real-time data feeds at LinkedIn all the…
-
Continue reading →: Why is Lombok a game changing library in Java development?Java has the reputation of being a verbose language, therefore it is not uncommon to end up with may lines of code, especially for those getter and setters. Lombok to the rescue? Lombok is a Java library that directly tackles this issue of code verbosity and repetition, there are many…
-
Continue reading →: Spring Boot FiltersWhat are Spring Boot filters? Spring boot uses filters to distill HTTP requests, the process here is: What can filters be used for? A filter is able to perform two operations, this is done on the response and the request. This can be used to restrict URL access to users…
-
Continue reading →: Spring Boot – Code Layout & StructureSpring Boot and it layout and code structure is something that is not predefined, it is up to the developer to follow the best practices to find the best practices available to them. You may ask what are these best practices? What typically occurs is that the project gets divided…
-
Continue reading →: Replication vs Partitioning vs Clustering vs Sharding (1 minute read)In the complex world of database management, terms like replication, partitioning, clustering, and sharding are often interchanged, leading to confusion. As someone who has delved into these topics for over a year, I believe it’s crucial to demystify these concepts. Replication: The Art of Duplication Replication involves duplicating tables or…
-
Continue reading →: What is Partitioning and Why is it Important?In my previous blogs published, I have covered the different ways of which how partitioning is managed with large datasets and thereby reduced to smaller subsets. All this content was derived from the author Martin Kleppman in “Designing Data Intensive Applications“. In this post I will summarise all the topics…
-
Continue reading →: Parallel Query Execution – What is it?To begin as Martin Kleppman from Designing Data Intensive Applications outlines, there are simple queries that read and write a single key. Plus there are scatter gather queries, in the case of document partition secondary indexes. Massive Parallel Processing (MPP) This is about the level of access supported by most…
-
Continue reading →: How does Partitioning work when Requests are being Routed?Let depict a situation where we have now partitioned our dataset running across multiple nodes and multiple machine… There is a question here… When a client wants to make a request, how does it know which node to connect to? 🤔 As partitions are rebalanced, the assignment of partitions to…
-
Continue reading →: How to decide between Automatic and Manual Rebalancing in Operations? (Partitions)There is a critical question to be raised on deciding whether we choose automatic or manual rebalancing… “There is a gradient between fully automatic rebalancing, in which the system decides automatically when to move partitions to one node to another without any administrator interaction, and fully manual rebalancing, in which…







