<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yasith Wimukthi on Medium]]></title>
        <description><![CDATA[Stories by Yasith Wimukthi on Medium]]></description>
        <link>https://medium.com/@wimukthiyasith?source=rss-643b80a629e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UJRBylf0tTMRGj3dM00lDg.jpeg</url>
            <title>Stories by Yasith Wimukthi on Medium</title>
            <link>https://medium.com/@wimukthiyasith?source=rss-643b80a629e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 00:29:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wimukthiyasith/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Idempotency in Distributed Systems: The Concept That Makes Kafka Consumers Safer]]></title>
            <link>https://blog.stackademic.com/idempotency-in-distributed-systems-the-concept-that-makes-kafka-consumers-safer-f94be702c7f1?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f94be702c7f1</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Mon, 26 Oct 2026 09:35:25 GMT</pubDate>
            <atom:updated>2026-10-26T09:35:25.713Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*anVNUhKuImD3BDvkE-MUog.png" /></figure><p>One thing I keep seeing in Kafka and distributed-systems discussions is the word idempotency.</p><p>It sounds simple:</p><blockquote>“If I process the same request twice, the result should be the same.”</blockquote><p>But in production, idempotency becomes much more important when we have:</p><ul><li>Kafka retries</li><li>consumer crashes</li><li>database transactions</li><li>HTTP retries</li><li>third-party APIs</li><li>message reprocessing</li><li>network timeouts</li><li>duplicate requests</li></ul><p>A system that assumes “this message will only be processed once” can behave very differently from a system designed to handle duplicates safely.</p><p>So let’s look at idempotency from a real production perspective.</p><h3>What is idempotency?</h3><p>An operation is idempotent when performing it multiple times has the same intended final effect as performing it once.</p><p>For example:</p><pre>Set order status = SHIPPED</pre><p>Doing this once:</p><pre>SHIPPED</pre><p>Doing it again:</p><pre>SHIPPED</pre><p>The final state is still:</p><pre>SHIPPED</pre><p>But consider:</p><pre>Increase account balance by $100</pre><p>Doing it once:</p><pre>+100</pre><p>Doing it twice:</p><pre>+200</pre><p>That’s not naturally idempotent.</p><p>So if the same event can be delivered twice, we need a way to make the processing safe.</p><h3>Why do duplicates happen in production?</h3><p>A common mistake is to think:</p><blockquote><em>“Kafka delivered the message, so I’ll process it once.”</em></blockquote><p>Distributed systems don’t work that cleanly.</p><p>Imagine:</p><pre>Kafka<br>  ↓<br>Consumer<br>  ↓<br>MySQL</pre><p>The consumer receives:</p><pre>OrderCreated<br>eventId = EVT-1001</pre><p>It updates MySQL successfully:</p><pre>DB COMMIT ✅</pre><p>Then the application crashes before the Kafka offset is committed:</p><pre>DB COMMIT<br>    ↓<br>💥 Application crashes<br>    ↓<br>Kafka offset not committed</pre><p>Kafka can deliver the event again.</p><p>So the consumer may see:</p><pre>EVT-1001<br>EVT-1001</pre><p>The duplicate isn’t necessarily a Kafka bug.</p><p>It’s a normal consequence of distributed failure and at-least-once processing.</p><h3>The Idempotent Consumer Pattern</h3><p>A common solution is to give every event a unique identifier:</p><pre>{<br>  &quot;eventId&quot;: &quot;EVT-1001&quot;,<br>  &quot;orderId&quot;: &quot;ORD-101&quot;,<br>  &quot;type&quot;: &quot;OrderCreated&quot;<br>}</pre><p>Then maintain a record of processed events.</p><p>For example:</p><pre>processed_events</pre><pre>event_id<br>----------------<br>EVT-1001<br>EVT-1002<br>EVT-1003</pre><p>with a database uniqueness constraint on event_id.</p><p>The processing flow becomes:</p><pre>Kafka<br>  ↓<br>OrderCreated<br>  ↓<br>Check/process event<br>  ↓<br>DB Transaction<br>  ├── Update business data<br>  └── Record eventId<br>  ↓<br>COMMIT<br>  ↓<br>Kafka offset acknowledgement/commit</pre><p>If Kafka later redelivers EVT-1001, the consumer can detect that the event has already been processed.</p><p>This is much safer than assuming the message will only arrive once.</p><h3>Why should the idempotency record be part of the DB transaction?</h3><p>Consider:</p><pre>Order update<br>+<br>Processed event record</pre><p>These should normally succeed or fail together.</p><p>For example:</p><pre>BEGIN TRANSACTION</pre><pre>UPDATE orders<br>SET status = &#39;CREATED&#39;<br>WHERE order_id = &#39;ORD-101&#39;;</pre><pre>INSERT INTO processed_events(event_id)<br>VALUES (&#39;EVT-1001&#39;);</pre><pre>COMMIT;</pre><p>If the transaction fails:</p><pre>ROLLBACK</pre><p>both operations are rolled back.</p><p>That prevents a situation where we mark an event as processed but fail to apply the actual business change.</p><h3>Don’t rely only on “check then insert”</h3><p>This pattern looks tempting:</p><pre>if (!processedEventRepository.existsById(eventId)) {<br>    processBusinessLogic();<br>    processedEventRepository.save(eventId);<br>}</pre><p>But checking first isn’t enough in a concurrent system.</p><p>Two processing attempts could theoretically do:</p><pre>Consumer A → event exists? NO<br>Consumer B → event exists? NO</pre><pre>Consumer A → INSERT<br>Consumer B → INSERT</pre><p>That’s why the database should enforce uniqueness as well.</p><p>For example:</p><pre>CREATE UNIQUE INDEX ux_processed_event<br>ON processed_events(event_id);</pre><p>The database becomes the final protection against duplicate event registration.</p><h3>Idempotency is not only a Kafka problem</h3><p>This is where the concept becomes really useful.</p><p>Imagine:</p><pre>Kafka<br>  ↓<br>Order Service<br>  ↓<br>Payment API</pre><p>The consumer calls:</p><pre>POST /payments</pre><p>The payment service processes the payment successfully.</p><p>But the response is lost:</p><pre>Order Service<br>     ↓<br>Payment API<br>     ↓<br>Payment succeeds ✅<br>     ↓<br>Network failure<br>     ↓<br>Order Service receives timeout ❌</pre><p>The Order Service doesn’t know whether the payment succeeded.</p><p>Should it retry?</p><p>If the payment API simply creates another payment every time, we could accidentally charge the customer twice.</p><p>This is where an idempotency key becomes extremely useful.</p><p>For example:</p><pre>Idempotency-Key: PAYMENT-ORDER-101</pre><p>The payment service can remember that key and ensure that retrying the same logical operation doesn’t create another payment.</p><p>So the flow becomes:</p><pre>Order Service<br>     ↓<br>Payment API<br>     │<br>     │ Idempotency-Key = PAYMENT-ORDER-101<br>     ↓<br>Payment Service</pre><p>If the request is retried with the same key, the payment service can recognize it as the same logical operation.</p><p>The exact behavior depends on the API/service contract, so idempotency needs to be deliberately designed rather than assumed.</p><h3>Kafka Producer Idempotence vs Consumer Idempotency</h3><p>These two are often confused.</p><h3>Producer idempotence</h3><p>Kafka’s producer idempotence protects against duplicate records caused by producer retries.</p><p>Conceptually:</p><pre>Producer<br>   ↓<br>Kafka<br>   ↓<br>Network/ACK failure<br>   ↓<br>Producer retries</pre><p>Kafka uses producer identity and sequence information to prevent retry-related duplicate records.</p><p>For Kafka producers, idempotence can be explicitly configured with:</p><pre>enable.idempotence=true</pre><p>When enabled, Kafka requires compatible settings such as acks=all, and the producer uses sequence numbers to preserve ordering while handling retries.</p><h3>Consumer idempotency</h3><p>Consumer idempotency is a different problem.</p><p>It protects the business operation when the same event is delivered more than once.</p><p>For example:</p><pre>Kafka<br>  ↓<br>EVT-1001<br>  ↓<br>Consumer<br>  ↓<br>MySQL</pre><p>If Kafka delivers EVT-1001 again:</p><pre>EVT-1001<br>  ↓<br>Consumer<br>  ↓<br>Already processed?<br>  ↓<br>YES<br>  ↓<br>Don&#39;t execute business operation again</pre><p>So:</p><pre>Producer idempotence<br>        ↓<br>Protects Kafka publishing</pre><pre>Consumer idempotency<br>        ↓<br>Protects business processing</pre><p>They solve different problems.</p><h3>Idempotency and Kafka Offsets</h3><p>This is one of the most important production scenarios.</p><p>Suppose:</p><pre>1. Consume event<br>2. Update database<br>3. Commit database transaction<br>4. Application crashes<br>5. Kafka offset isn&#39;t committed</pre><p>Kafka may redeliver the event.</p><p>That’s why a consumer should be designed with the expectation that duplicate delivery can happen.</p><p>A common pattern is:</p><pre>Kafka event<br>    ↓<br>DB transaction<br>    ├── Business operation<br>    └── Record eventId<br>    ↓<br>DB COMMIT<br>    ↓<br>Offset acknowledgement/commit</pre><p>If the application crashes after the DB commit but before the offset commit:</p><pre>Kafka redelivers<br>      ↓<br>Same eventId<br>      ↓<br>Already processed<br>      ↓<br>Skip duplicate business operation</pre><p>This gives us a practical at-least-once + idempotent consumer design.</p><h3>What about @Transactional?</h3><p>This is another common misunderstanding in Spring Boot applications.</p><p>You might see:</p><pre>@Transactional<br>public void process(OrderCreated event) {<br>    orderRepository.save(order);<br>}</pre><p>@Transactional is useful for making the participating database operations atomic.</p><p>But a normal database transaction does not automatically mean that MySQL and Kafka are one distributed atomic transaction.</p><p>Kafka has its own transaction mechanisms, and Spring for Apache Kafka supports Kafka transactions and transaction synchronization with other transaction managers.</p><p>So I wouldn’t say:</p><blockquote><em>“@Transactional gives us exactly-once processing.”</em></blockquote><p>That statement is too broad.</p><p>The actual transaction configuration and architecture matter.</p><h3>What about Exactly-Once Semantics?</h3><p>Kafka does support transactions and exactly-once semantics for specific Kafka processing patterns.</p><p>For example, Spring Kafka supports a transactional listener where offsets can be sent to the Kafka transaction, and Kafka-produced records can participate in that transaction.</p><p>But this should not be interpreted as:</p><blockquote><em>“Every Kafka → MySQL → external API workflow is automatically exactly once.”</em></blockquote><p>If your workflow includes external systems, you still need to consider their transaction and idempotency capabilities.</p><p>For many Kafka → database consumers, designing for:</p><pre>At-least-once delivery<br>+<br>Idempotent processing</pre><p>is a very practical approach.</p><h3>A Production Example</h3><p>Imagine an order-processing system:</p><pre>Order Service<br>      ↓<br>Kafka<br>      ↓<br>Order Consumer<br>      ↓<br>MySQL<br>      ↓<br>Payment Service</pre><p>An OrderCreated event contains:</p><pre>{<br>  &quot;eventId&quot;: &quot;EVT-1001&quot;,<br>  &quot;orderId&quot;: &quot;ORD-101&quot;<br>}</pre><p>The consumer needs to:</p><ol><li>Create the order in its database.</li><li>Call the payment service.</li><li>Continue processing the order.</li></ol><p>Now think about the failure scenarios.</p><h3>Scenario 1 — Consumer crashes before DB commit</h3><pre>Kafka<br> ↓<br>Consumer<br> ↓<br>DB transaction<br> ↓<br>💥 crash</pre><p>Transaction rolls back.</p><p>Kafka can redeliver.</p><p>That’s fine.</p><h3>Scenario 2 — DB commits, then consumer crashes</h3><pre>Kafka<br> ↓<br>Consumer<br> ↓<br>DB COMMIT ✅<br> ↓<br>💥 crash</pre><p>Kafka can redeliver.</p><p>The eventId allows the consumer to recognize the duplicate.</p><h3>Scenario 3 — Payment succeeds but response is lost</h3><pre>Consumer<br>   ↓<br>Payment Service<br>   ↓<br>Payment succeeds<br>   ↓<br>Response lost</pre><p>The consumer might retry.</p><p>This is where an idempotency key at the payment API boundary becomes important.</p><h3>The important lesson</h3><p>Idempotency isn’t a single Kafka configuration.</p><p>It’s a system design property.</p><p>You need to think about it at every boundary where retries can happen:</p><pre>Producer<br>   ↓<br>Kafka<br>   ↓<br>Consumer<br>   ↓<br>Database<br>   ↓<br>External API</pre><p>At each boundary, ask:</p><blockquote><em>“What happens if this operation happens twice?”</em></blockquote><p>That question alone can reveal many production bugs.</p><h3>A Simple Production Checklist</h3><p>When designing an event-driven service, I would ask:</p><h4>Kafka Producer</h4><ul><li>Can producer retries create duplicates?</li><li>Is producer idempotence enabled/configured appropriately?</li><li>Is the message key correct for the required ordering?</li></ul><h4>Kafka Consumer</h4><ul><li>Can the same event be delivered again?</li><li>Do we have a unique event ID?</li><li>How do we detect an already processed event?</li><li>Is the idempotency check protected by a database constraint?</li></ul><h4>Database</h4><ul><li>Are business updates and the processed-event record in the correct transaction boundary?</li><li>Are unique constraints being used where necessary?</li><li>What happens if the application crashes after DB commit?</li></ul><h4>External APIs</h4><ul><li>Does the API support idempotency keys?</li><li>What happens if the request succeeds but the response is lost?</li><li>Is retrying the operation safe?</li></ul><h4>Retries / DLT</h4><ul><li>Which failures are retryable?</li><li>Which failures are permanent?</li><li>What happens after retries are exhausted?</li><li>Can replaying a DLT message safely repeat the business operation?</li></ul><h3>The biggest takeaway</h3><p>For me, the most important lesson is this:</p><blockquote><em>Don’t design distributed systems assuming that an operation will happen exactly once. Design them so that repeating the operation is safe.</em></blockquote><p>Kafka can redeliver.</p><p>Networks can timeout.</p><p>Applications can crash.</p><p>Database commits can succeed just before an application failure.</p><p>External APIs can process a request even when the client doesn’t receive the response.</p><p>These are normal distributed-system failure scenarios.</p><p>Idempotency is how we make those failures manageable.</p><p>And that’s why I see idempotency as one of the most important concepts to understand when building reliable Kafka and Spring Boot applications.</p><p>#Kafka #ApacheKafka #SpringBoot #Java #Microservices #DistributedSystems #Idempotency #EventDrivenArchitecture #BackendDevelopment #SoftwareEngineering #SystemDesign #SoftwareArchitecture</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f94be702c7f1" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/idempotency-in-distributed-systems-the-concept-that-makes-kafka-consumers-safer-f94be702c7f1">Idempotency in Distributed Systems: The Concept That Makes Kafka Consumers Safer</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Clean REST APIs — API Versioning Best Practices]]></title>
            <link>https://blog.stackademic.com/designing-clean-rest-apis-api-versioning-best-practices-3624bf088b12?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3624bf088b12</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 17:57:56 GMT</pubDate>
            <atom:updated>2026-03-17T07:37:25.646Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiH7WChSd9G_RQON-4mSvA.jpeg" /></figure><p>When implementing a backend system, the API is a contract between the services and the client. If we design the API well, the system is easier to understand, integrate, and maintain. Therefore, a good API should have clear and consistent endpoints.</p><p>Let’s now look at some REST API naming conventions that can be followed when we are designing a REST API.</p><ol><li>Use nouns instead of verbs</li></ol><p>An endpoint represents resources, not actions. The HTTP method to be used for the operation we are performing has already been defined.</p><p>✔ GET /users → retrieve users<br>✔ POST /orders → create an order<br>✔ DELETE /orders/101 → delete an order</p><p>Therefore, avoid verb-based endpoints like this.</p><p>❌ /getUsers<br>❌ /createOrder<br>❌ /deleteUser</p><p>When resource-oriented endpoints are created in this way, the API is predictable and intuitive.</p><p>2. Use plural resource names</p><p>REST APIs typically represent a collection of resources, so plural naming is preferable.</p><p>✔ /users<br>✔ /products<br>✔ /orders</p><p>Endpoints can be created for single resources in this way.</p><p>✔ /users/15<br>✔ /orders/101</p><p>This way, we can clearly distinguish between a collection of resources and an individual resource.</p><p>3. Use hierarchical structure for relationships</p><p>We can use nested paths in scenarios like fetching orders for a user whose user ID is 15.</p><p>✔ /users/15/orders → orders belonging to a user<br>✔ /orders/101/items → items inside an order</p><p>4. Use query parameters for filtering and searching</p><p>Instead of creating separate endpoints for filter and search operations, we can use query parameters. This way, our API becomes more flexible and we can avoid unnecessary endpoints.</p><p>✔ /products?category=electronics<br>✔ /orders?status=completed<br>✔ /users?country=SriLanka</p><p>5. Keep endpoints simple and consistent</p><p>Don’t create too many complex paths as this will make maintenance difficult. Consistency in the API improves the developer experience.</p><p>Good examples:<br>✔ /products/25<br>✔ /products?limit=10&amp;offset=20</p><p>6. Use lowercase and hyphens</p><p>This allows us to improve readability and consistency.</p><p>✔ /user-profiles<br>✔ /order-items</p><p>Avoid:<br>❌ /UserProfiles<br>❌ /orderItems</p><p>7. Version your APIs</p><p>APIs evolve over time, so it’s important to use a proper strategy to version your API. There are several ways to do this.</p><p>✔ /api/v1/users<br>✔ /api/v2/orders</p><p>When we version properly, changes will not break existing systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3624bf088b12" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/designing-clean-rest-apis-api-versioning-best-practices-3624bf088b12">Designing Clean REST APIs — API Versioning Best Practices</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[   : Understanding ConcurrentHashMap in Java]]></title>
            <link>https://blog.stackademic.com/understanding-concurrenthashmap-in-java-0b3b80be9c51?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b3b80be9c51</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[hashmap]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 04:04:48 GMT</pubDate>
            <atom:updated>2025-01-13T08:16:21.435Z</atom:updated>
            <content:encoded><![CDATA[<h3>𝗝𝗮𝘃𝗮 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗦𝗲𝗿𝗶𝗲𝘀 : Understanding ConcurrentHashMap in Java</h3><p>In the world of multi-threaded applications, achieving thread safety while maintaining performance is a challenge. Java’s ConcurrentHashMap is designed to address this, offering a thread-safe alternative to HashMap without compromising on scalability. In this blog, we’ll explore why ConcurrentHashMap is essential, how it works, its key features, and common use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*OUOPs_YHVA0aAShKEO7kQQ.jpeg" /></figure><h3>Why Not HashMap?</h3><p>HashMap is widely used for key-value storage, but it’s not thread-safe. In highly concurrent environments, this can lead to unpredictable behavior and data corruption.</p><p>A common workaround is using Collections.synchronizedMap(), which wraps a HashMap in a synchronized map to make it thread-safe. However, this comes with a trade-off: the entire map is locked for any operation, creating a bottleneck in high-concurrency scenarios.</p><p>This is where ConcurrentHashMap shines.</p><h3>What Makes ConcurrentHashMap Special?</h3><ol><li><strong>Thread-Safe by Design — </strong>ConcurrentHashMap allows <strong>concurrent reads</strong> and <strong>segmented writes</strong>, enabling multiple threads to interact without blocking.</li><li><strong>Fine-Grained Locking — </strong>Unlike Collections.synchronizedMap(), ConcurrentHashMap uses a fine-grained locking mechanism. Instead of locking the entire map, it locks specific <strong>buckets</strong> or <strong>segments</strong> during updates. This significantly reduces contention and improves performance.</li><li><strong>Scalability — </strong>Its ability to handle high levels of concurrency makes it ideal for applications with high throughput requirements.</li><li><strong>No Null Keys/Values — </strong>ConcurrentHashMap doesn’t allow null keys or values, reducing the risk of NullPointerException during concurrent operations.</li></ol><h3>Use Cases of ConcurrentHashMap</h3><ol><li><strong>Caching Layers — </strong>Ideal for storing frequently accessed data in multi-threaded environments, where performance is critical.</li><li><strong>Real-Time Analytics — </strong>Perfect for tasks such as maintaining counters across multiple threads.</li><li><strong>Shared Configuration — </strong>Acts as a centralized, thread-safe storage for microservices or distributed systems to store configurations.</li><li><strong>Event-Driven Systems — </strong>Handles concurrent event processing without the risk of data corruption.</li></ol><h3>Key Methods of ConcurrentHashMap</h3><ul><li><strong>putIfAbsent(key, value)</strong><br>Adds a value only if the specified key is not already present.</li><li><strong>compute(key, (k, v) -&gt; newValue)</strong><br>Atomically updates the value associated with the specified key.</li><li><strong>forEach and </strong><strong>reduce</strong><br>These methods are designed for parallel operations, enabling efficient processing of large datasets.</li></ul><h3>When Should You Use ConcurrentHashMap?</h3><p>ConcurrentHashMap is your go-to choice when working in multi-threaded environments where both <strong>thread safety</strong> and <strong>high performance</strong> are essential. From real-time systems to analytics engines, it’s a robust solution for handling concurrent operations without sacrificing scalability.</p><p>Java’s ConcurrentHashMap is a powerful tool for developers working with multi-threaded applications. Its design ensures thread safety, minimizes contention, and boosts performance, making it indispensable for modern, high-throughput systems.</p><p>Have you used ConcurrentHashMap in your projects? Share your experiences or insights in the comments below!</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a></li><li><a href="https://cofeed.app/"><strong>Check out CoFeed, the smart way to stay up-to-date with the latest in tech</strong></a> <strong>🧪</strong></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b3b80be9c51" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/understanding-concurrenthashmap-in-java-0b3b80be9c51">𝗝𝗮𝘃𝗮 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗦𝗲𝗿𝗶𝗲𝘀 : Understanding ConcurrentHashMap in Java</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[  :    ]]></title>
            <link>https://blog.stackademic.com/-d834f07b9cc2?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d834f07b9cc2</guid>
            <category><![CDATA[hashmap]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Sat, 11 Jan 2025 04:00:00 GMT</pubDate>
            <atom:updated>2025-01-13T08:16:27.964Z</atom:updated>
            <content:encoded><![CDATA[<p>In Java interviews, understanding HashMap is a must! Let’s dive deep into its internals and mechanics. 💡</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*qoh73pyp6jzigjI9_LFSPA.jpeg" /></figure><p>🔑 𝗞𝗲𝘆 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀:</p><p>𝗔𝗿𝗿𝗮𝘆 𝗼𝗳 𝗕𝘂𝗰𝗸𝗲𝘁𝘀 🗂️ — HashMap stores key-value pairs in an internal array of buckets. Each index represents a bucket that holds one or more entries.</p><p>𝗛𝗮𝘀𝗵𝗶𝗻𝗴 🔢 — The put() method applies the hashCode() of the key to compute the hash and derive the bucket index. This ensures efficient storage and retrieval.</p><p>𝗟𝗶𝗻𝗸𝗲𝗱𝗟𝗶𝘀𝘁 / 𝗧𝗿𝗲𝗲𝘀 🔗 — When multiple keys hash to the same bucket (collision), entries form a LinkedList. If the number of entries in a bucket reaches 8, it is transformed into a balanced tree (since Java 8), optimizing lookups to O(log n).</p><p>𝗟𝗼𝗮𝗱 𝗙𝗮𝗰𝘁𝗼𝗿 📈 — A load factor of 0.75 triggers resizing. When the array is 75% full, it doubles in size, redistributing existing entries to minimize collisions.</p><p>⚙️ 𝗛𝗼𝘄 𝗢𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀 𝗪𝗼𝗿𝗸:</p><p>1️⃣ put(K key, V value):</p><p>• Step 1: Compute the hashCode() of the key.<br>• Step 2: Calculate the bucket index from the hash.<br>• Step 3: If the bucket is empty, store the entry. If occupied, compare keys using equals().<br>• Step 4: If a matching key exists, update the value. Otherwise, add the entry to the LinkedList/tree.</p><p>2️⃣ 𝗴𝗲𝘁(𝗢𝗯𝗷𝗲𝗰𝘁 𝗸𝗲𝘆):</p><p>• Step 1: Hash the key to find the bucket.<br>• Step 2: If multiple entries exist, use equals() to find the target key.<br>• Step 3: Return the value if found; otherwise, return null.</p><p>🍀 𝗖𝗼𝗹𝗹𝗶𝘀𝗶𝗼𝗻 𝗛𝗮𝗻𝗱𝗹𝗶𝗻𝗴:</p><p>• Before Java 8: Colliding entries were stored in a LinkedList, resulting in O(n) complexity in the worst case.<br>• After Java 8: If a bucket contains 8 or more entries, it converts into a balanced tree, reducing lookup time to O(log n).</p><p>🍀 𝗥𝗲𝘀𝗶𝘇𝗶𝗻𝗴 𝗮𝗻𝗱 𝗥𝗲𝗵𝗮𝘀𝗵𝗶𝗻𝗴:</p><p>When the bucket array exceeds 75% capacity, resizing occurs.<br>The array size doubles, and all entries are rehashed to new buckets. This process is computationally expensive but infrequent if load factors are managed.</p><p>🍀 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 𝗖𝗼𝗻𝘀𝗶𝗱𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀:</p><p>✅ Good Hash Functions — Minimize collisions by distributing entries uniformly across buckets.<br>✅ Manage Load Factor — Keeping the load factor under control prevents frequent resizing.<br>✅ Immutable Keys — Use immutable objects like String or Integer as keys to ensure hash values remain consistent.<br>✅ Concurrency Caution — HashMap is not thread-safe. Use ConcurrentHashMap or Collections.synchronizedMap() for multi-threading.</p><p>🔗 𝗪𝗵𝘆 𝗜𝘁 𝗠𝗮𝘁𝘁𝗲𝗿𝘀:</p><p>HashMap is at the core of many Java applications. A solid understanding can optimize performance and make you stand out in interviews. Knowing internal mechanics helps troubleshoot performance bottlenecks and avoid subtle bugs</p><p>💼 Stay tuned for more deep dives into Java internals!</p><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a></li><li><a href="https://cofeed.app/"><strong>Check out CoFeed, the smart way to stay up-to-date with the latest in tech</strong></a> <strong>🧪</strong></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d834f07b9cc2" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/-d834f07b9cc2">𝗝𝗮𝘃𝗮 𝗜𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗦𝗲𝗿𝗶𝗲𝘀: 𝗛𝗼𝘄 𝗛𝗮𝘀𝗵𝗠𝗮𝗽 𝗪𝗼𝗿𝗸𝘀 𝗜𝗻𝘁𝗲𝗿𝗻𝗮𝗹𝗹𝘆</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Heap Memory vs. Stack Memory in Java: What’s the Difference?]]></title>
            <link>https://blog.stackademic.com/heap-memory-vs-stack-memory-in-java-whats-the-difference-6dfd343c5b09?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dfd343c5b09</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[heap]]></category>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[jvm]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 10:25:19 GMT</pubDate>
            <atom:updated>2024-08-19T00:08:10.002Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding memory management in Java is crucial for writing efficient and robust applications. Two key areas where memory is managed are Heap Memory and Stack Memory. These regions play distinct roles, and knowing how they operate can help you avoid common pitfalls like memory leaks and application crashes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*XLZmAVJmcsjKtKFjI-sFhQ.jpeg" /></figure><h4>Stack Memory</h4><p>Stack Memory is the area where Java stores local variables and keeps track of method calls. When a method is invoked, a “stack frame” is created to store its variables and the address to return to after the method completes. This frame is added to the top of the Stack and is removed as soon as the method finishes, immediately freeing the space it occupied. The Stack is efficient and fast because it uses Last-In-First-Out (LIFO) order, but it comes with a limitation — its size is fixed. If the Stack becomes full, a StackOverflowError occurs, potentially crashing your application.</p><h4>Heap Memory</h4><p>Heap Memory, on the other hand, is where all Java objects are stored. Unlike the Stack, the Heap is much larger and allows dynamic memory allocation. Objects that are created stay in the Heap until they are no longer referenced, at which point Java’s Garbage Collector automatically removes them to free up space. While the Heap is more flexible and can grow as needed, it is slightly slower to access compared to the Stack. This is because the process of locating and allocating space for objects in the Heap involves more overhead.</p><h4>Why It Matters</h4><p>Understanding the difference between Stack and Heap memory is key to optimizing your application’s performance and resource usage. Mismanagement can lead to errors like StackOverflowError if the Stack is overused, or OutOfMemoryError when the Heap runs out of space. By being mindful of where and how memory is allocated, you can build more efficient, stable, and maintainable Java applications.</p><p>In summary, Stack Memory is fast and efficient for managing method calls and local variables, while Heap Memory provides a larger, more flexible space for objects. Balancing the use of these two memory areas will help you write better Java code and prevent potential performance issues.</p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dfd343c5b09" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/heap-memory-vs-stack-memory-in-java-whats-the-difference-6dfd343c5b09">Heap Memory vs. Stack Memory in Java: What’s the Difference?</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Command Query Responsibility Segregation (CQRS) Architecture Pattern]]></title>
            <link>https://blog.stackademic.com/understanding-the-command-query-responsibility-segregation-cqrs-architecture-pattern-5bdfb4ebd5a4?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bdfb4ebd5a4</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[cqrs]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Wed, 14 Aug 2024 05:25:24 GMT</pubDate>
            <atom:updated>2024-08-19T00:12:47.909Z</atom:updated>
            <content:encoded><![CDATA[<p>In software architecture, one of the most common patterns developers encounter is CRUD (Create, Read, Update, Delete). Here, reading and writing operations are handled by the same data model, and often, the same database schema. While CRUD is effective for simple applications, it begins to show limitations as the complexity of requirements increases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*0bqboycsw7pqCUET2biBgQ.png" /></figure><h3>The Need for CQRS</h3><p>Imagine a large-scale e-commerce platform. On such a platform, users need to quickly access product details, reviews, and merchant profiles, while the system simultaneously manages heavy transactional operations like inventory updates and order placements. If both reading and writing operations are managed by the same model and database, the system can become overburdened, leading to performance bottlenecks. These bottlenecks can slow down the application, affecting the user experience and business outcomes.</p><p>This is where the Command Query Responsibility Segregation (CQRS) pattern comes into play. CQRS addresses these scaling challenges by separating the responsibilities of commands and queries. Let’s dive deeper into the components and approaches of CQRS.</p><h3>Components of CQRS</h3><ol><li><strong>Command</strong>: Commands are responsible for performing actions that change the state of the system, such as creating an order or updating inventory. Commands typically do not return data, as their primary role is to trigger state changes.</li><li><strong>Query</strong>: Queries handle data retrieval. They are responsible for fetching data from the system without modifying it. This separation allows queries to be optimized for read performance.</li><li><strong>Command and Query Handlers</strong>: Handlers are intermediaries that facilitate the execution of commands and queries. They are responsible for processing the input and coordinating with the respective data models.</li></ol><h3>CQRS Implementation Approaches</h3><p>There are two primary approaches to implementing the CQRS pattern: the Single Database Approach and the Dual Database Approach.</p><h4>1. Single Database Approach</h4><p>In the Single Database Approach, both command and query operations are performed on the same database. However, the models or schemas used for these operations can differ. This approach allows for some level of optimization, as command and query operations can be tailored to their specific needs, even though they share the same physical storage.</p><p><strong>Benefits:</strong></p><ul><li><strong>Simplified Infrastructure</strong>: Using a single database reduces complexity and overhead. There’s no need for additional synchronization mechanisms between databases.</li><li><strong>Immediate Consistency</strong>: Since all operations occur within the same database, there’s no lag between write and read operations, ensuring immediate consistency.</li></ul><p><strong>Trade-offs:</strong></p><ul><li><strong>Potential Bottlenecks</strong>: As both operations share the same resource, heavy concurrent operations could lead to bottlenecks, impacting performance.</li><li><strong>Limited Flexibility</strong>: Tuning and scaling command and query operations independently is challenging, as they are bound to the same database.</li></ul><h4>2. Dual Database Approach</h4><p>The Dual Database Approach completely separates command and query operations, often using two distinct databases or storage systems. The write database is dedicated to handling command operations, while the read database is optimized for query operations. A synchronization system ensures data consistency between the two databases.</p><p><strong>Benefits:</strong></p><ul><li><strong>Independent Optimization</strong>: Each operation can be individually tuned, scaled, and optimized for its specific requirements.</li><li><strong>Load Distribution</strong>: By hosting the databases on different servers or services, or even using different database solutions, load distribution becomes possible, enhancing overall performance.</li></ul><p><strong>Trade-offs:</strong></p><ul><li><strong>Increased Complexity</strong>: Ensuring data consistency between the two databases adds complexity to the system. Synchronization mechanisms are necessary to keep both databases aligned.</li><li><strong>Potential Data Latency</strong>: If there’s a delay in reflecting changes from the write database to the read database, it could lead to misalignment or data latency, affecting the accuracy of queries.</li></ul><p>The CQRS pattern is a powerful tool for managing complex systems with heavy read and write operations. By segregating the responsibilities of commands and queries, CQRS allows for greater flexibility, scalability, and performance optimization. However, the choice between the Single Database and Dual Database approaches depends on the specific needs of your application. While the Single Database Approach offers simplicity and immediate consistency, the Dual Database Approach provides greater optimization and load distribution at the cost of increased complexity.</p><p>When implemented correctly, CQRS can significantly enhance the efficiency and scalability of your application, making it a valuable pattern in the architect’s toolkit.</p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bdfb4ebd5a4" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/understanding-the-command-query-responsibility-segregation-cqrs-architecture-pattern-5bdfb4ebd5a4">Understanding the Command Query Responsibility Segregation (CQRS) Architecture Pattern</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Java Memory Model and Garbage Collection]]></title>
            <link>https://blog.stackademic.com/understanding-the-java-memory-model-and-garbage-collection-84f087422ee9?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/84f087422ee9</guid>
            <category><![CDATA[garbage-collection]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Thu, 08 Aug 2024 15:47:17 GMT</pubDate>
            <atom:updated>2024-08-09T00:41:04.786Z</atom:updated>
            <content:encoded><![CDATA[<p>When diving into Java, especially in interviews, one topic that often comes up is the Java memory model. Let’s break it down in a way that’s easy to understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csCtCHX32M353ya9fDuuIA.png" /></figure><h3>Java’s Automatic Memory Management</h3><p>One of Java’s strengths is its ability to manage memory automatically. This means that Java takes care of allocating and freeing up memory for you, so you don’t have to worry about it like in languages such as C or C++.</p><h3>Java Memory Structure</h3><p>Java’s memory is divided into two main sections:</p><ol><li><strong>Metaspace</strong></li><li><strong>Heap</strong></li></ol><h4>Metaspace</h4><p>Introduced in Java 8, Metaspace replaced the older Permanent Generation (PermGen). It stores the metadata about the classes used by the JVM (Java Virtual Machine). The big improvement here is that Metaspace grows automatically as needed, so you don’t run into out-of-memory issues as often as you might have with PermGen.</p><p>In the past, you had to manually set the size of PermGen using JVM options like -XX:PermSize and -XX:MaxPermSize. With Metaspace, this manual tuning is no longer necessary, which helps prevent memory leaks and enhances performance.</p><h4>Heap</h4><p>The Heap is where Java stores objects when your program is running. It’s divided into two main areas:</p><ol><li><strong>Young Generation</strong></li><li><strong>Old Generation</strong></li></ol><ul><li><strong>Young Generation:</strong> This is where new objects are created. It’s further divided into Eden Space and Survivor Space. When Eden Space fills up, a process called <em>minor garbage collection</em> runs, and surviving objects are moved to one of the Survivor Spaces. If these objects continue to survive multiple cycles, they eventually move to the Old Generation.</li><li><strong>Old Generation:</strong> This area holds objects that have been around longer. <em>Major garbage collection</em> happens here to clean up objects that are no longer needed, freeing up memory.</li></ul><p>The two Survivor Spaces (usually called S0 and S1) use a technique where live objects are copied back and forth between them during garbage collection before they’re moved to the Old Generation. This method helps manage short-lived objects more efficiently and reduces the overall garbage collection workload.</p><h3>Tuning Java Heap</h3><p>You can tweak the Heap’s size using JVM flags to optimize your application’s performance:</p><ul><li>-Xms: Sets the initial heap size.</li><li>-Xmx: Sets the maximum heap size.</li><li>-Xmn: Sets the size of the Young Generation.</li><li>-XX:+UseSerialGC: Uses the Serial Garbage Collector.</li><li>-XX:+UseParallelGC: Uses the Parallel Garbage Collector.</li><li>-XX:+UseG1GC: Uses the G1 Garbage Collector.</li><li>-XX:ParallelGCThreads: Sets the number of threads used for garbage collection.</li></ul><p>Understanding these settings allows you to fine-tune your application’s memory management for better performance.</p><h3>How Java’s Garbage Collection Works</h3><p>Garbage collection in Java is an automatic process that identifies and removes objects that are no longer needed by your application, freeing up memory.</p><h4>Key Concepts of Java Garbage Collection</h4><ul><li><strong>Garbage Collection Roots:</strong> These are special objects that are always considered “in use” and are the starting point for garbage collection. If an object can be reached from a root, it’s considered live; otherwise, it’s dead and eligible for garbage collection.</li><li><strong>Marking Live Objects:</strong> The garbage collector scans through all objects starting from the roots and marks those that are still in use.</li><li><strong>Sweeping Dead Objects:</strong> After marking, the garbage collector sweeps through the memory and removes objects that are no longer marked as live.</li><li><strong>Compacting Memory:</strong> In some garbage collection algorithms, the memory is compacted after sweeping, which means live objects are moved closer together. This reduces fragmentation and makes space available for new objects.</li></ul><h3>Common Garbage Collection Algorithms</h3><ol><li><strong>Serial GC</strong></li></ol><ul><li><strong>Best for:</strong> Small applications running in single-threaded environments.</li><li><strong>Advantages:</strong> Simple and low overhead.</li><li><strong>Disadvantages:</strong> Not suitable for large, multi-threaded applications because it can cause significant pauses.</li></ul><p><strong>2. Parallel GC</strong></p><ul><li><strong>Best for:</strong> Applications where throughput is critical.</li><li><strong>Advantages:</strong> Uses multiple threads to speed up garbage collection, increasing overall application performance.</li><li><strong>Disadvantages:</strong> May not be ideal for applications that need low pause times.</li></ul><p><strong>3. Concurrent Mark-Sweep (CMS) GC</strong></p><ul><li><strong>Best for:</strong> Applications that require low latency.</li><li><strong>Advantages:</strong> Does much of its work concurrently, reducing pause times.</li><li><strong>Disadvantages:</strong> Can be CPU intensive and may lead to memory fragmentation.</li></ul><p><strong>4. Garbage-First (G1) GC</strong></p><ul><li><strong>Best for:</strong> Applications with large heaps.</li><li><strong>Advantages:</strong> Breaks the heap into regions and focuses on cleaning the ones with the most garbage first, making it efficient for large heaps.</li><li><strong>Disadvantages:</strong> Can be complex to tune effectively.</li></ul><p><strong>5. Epsilon GC</strong></p><ul><li><strong>Best for:</strong> Applications with a predictable memory footprint.</li><li><strong>Advantages:</strong> Allocates memory but doesn’t actually perform garbage collection, which can be useful in specific scenarios.</li><li><strong>Disadvantages:</strong> Since it doesn’t reclaim memory, you can run out of memory if it’s not managed carefully.</li></ul><p><strong>6. ZGC</strong></p><ul><li><strong>Best for:</strong> Applications that need low latency and high scalability.</li><li><strong>Advantages:</strong> Performs garbage collection concurrently with the application’s execution, minimizing pause times.</li><li><strong>Disadvantages:</strong> It’s relatively new and may require specific tuning.</li></ul><p>By understanding and applying these concepts, you can improve your Java application’s performance and reliability, making it better equipped to handle real-world demands.</p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84f087422ee9" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/understanding-the-java-memory-model-and-garbage-collection-84f087422ee9">Understanding the Java Memory Model and Garbage Collection</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Replication: Enhancing Availability, Performance, and Reliability]]></title>
            <link>https://blog.stackademic.com/database-replication-enhancing-availability-performance-and-reliability-c15ed6f866c6?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c15ed6f866c6</guid>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[database-replication]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Thu, 01 Aug 2024 13:16:32 GMT</pubDate>
            <atom:updated>2024-08-02T04:38:27.100Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s data-driven world, ensuring that your database is always available, reliable, and performs efficiently is crucial. One effective way to achieve this is through database replication, which involves maintaining multiple copies of a database on different servers or locations. This technique significantly boosts system availability, reliability, and performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*6aO_VozwGRaAILlQCl4IIQ.png" /></figure><h3>Advantages of Database Replication</h3><ol><li><strong>High Availability</strong>: By having multiple copies of your data, it’s accessible even if one or more servers fail. This ensures your applications can continue to function without interruption, providing a seamless experience for users.</li><li><strong>Improved Performance</strong>: Distributing read operations across several servers balances the load, enhancing overall performance. This means faster query responses and a better user experience.</li><li><strong>Data Redundancy</strong>: Multiple copies of the data prevent loss in case of hardware failure. This redundancy is crucial for disaster recovery and ensures business continuity.</li></ol><h3>Master-Slave Replication Model</h3><p>A widely used architecture for database replication is the master-slave replication model, also known as the primary-secondary replication model. In this setup:</p><ul><li><strong>Master Server</strong>: Acts as the primary data source, handling all write operations.</li><li><strong>Slave Servers</strong>: Copies of the master database, handling read operations.</li></ul><p>Changes made to the master server are propagated to the slave servers to maintain consistency. This model is particularly beneficial for systems with more read operations than write operations.</p><h3>Benefits of Master-Slave Replication</h3><ol><li><strong>Improved Read Performance</strong>: Distributing read queries among several slave servers prevents overloading the master server. This allows the system to handle a large number of read operations simultaneously, improving the overall responsiveness.</li><li><strong>Enhanced Data Availability</strong>: If the master server fails, a slave server can be promoted to master, ensuring the system remains available. This failover mechanism is crucial for maintaining service uptime.</li><li><strong>Data Backup and Disaster Recovery</strong>: Slave databases act as real-time backups of the master database, aiding in recovery from data loss. This ensures that you can quickly restore data in case of accidental deletions or corruption.</li><li><strong>Scalability</strong>: The system can be scaled horizontally by adding more slave servers. This makes it easier to handle increasing loads without significant changes to the existing infrastructure.</li><li><strong>Reduced Latency</strong>: Slave databases set up in different geographical locations reduce latency for users accessing the data from various parts of the world. This leads to a faster and more responsive user experience.</li><li><strong>Reporting and Analytics</strong>: Slave databases can handle resource-intensive tasks like reporting and analytics without affecting the master database’s performance. This separation of concerns ensures that operational workloads do not impact analytical processing.</li></ol><h3>Challenges in Master-Slave Replication</h3><ol><li><strong>Replication Lag</strong>: Delays in propagating changes from the master to the slave databases can cause data inconsistency. This can be problematic for applications requiring real-time data accuracy.</li><li><strong>Increased Complexity</strong>: Managing multiple databases adds complexity to the system architecture. This includes ensuring data consistency, monitoring replication status, and handling failovers.</li><li><strong>Write Performance Limitation</strong>: All write operations go through the master server, which can become a bottleneck in scenarios with heavy write workloads. This can limit the system’s scalability in write-intensive applications.</li><li><strong>Data Consistency</strong>: Ensuring data consistency across databases is challenging, especially during network issues or failures. This requires robust mechanisms to detect and resolve inconsistencies.</li><li><strong>Resource Overhead</strong>: Managing multiple databases increases operational costs and resource utilization. This includes additional storage, network bandwidth, and administrative efforts.</li></ol><h3>Data Copying Strategies in Master-Slave Architecture</h3><p>There are three main strategies for copying data within the master-slave architecture:</p><h4>1. Synchronous Replication</h4><p>In synchronous replication, every write operation made to the master database is immediately copied to all slave databases. The transaction is only considered complete once each slave database sends back an acknowledgment.</p><p><strong>Advantages</strong>:</p><ul><li>High data consistency, as all copies are identical at all times.</li></ul><p><strong>Disadvantages</strong>:</p><ul><li>It can significantly impact the performance of write operations.</li><li>If one slave database becomes unresponsive, it can cause a system-wide slowdown.</li></ul><p><strong>Best for</strong>: Systems requiring high data consistency, such as financial systems.</p><h4>2. Asynchronous Replication</h4><p>In asynchronous replication, the master database doesn’t wait for acknowledgments from slave databases to complete a transaction. Changes in the master database are propagated to the slave databases with a delay.</p><p><strong>Advantages</strong>:</p><ul><li>Minimal impact on the write performance of the master database.</li></ul><p><strong>Disadvantages</strong>:</p><ul><li>Data inconsistency can occur in case of a failure.</li><li>Risk of data loss between replication intervals.</li></ul><p><strong>Best for</strong>: Systems where eventual consistency is acceptable and systems with high write throughput.</p><h4>3. Semi-Synchronous Replication</h4><p>Semi-synchronous replication combines elements of both synchronous and asynchronous replication. The master database completes the transaction locally and waits for an acknowledgment from at least one slave database, rather than all of them. Changes are then asynchronously propagated to the remaining slave databases.</p><p><strong>Advantages</strong>:</p><ul><li>Balances data consistency and performance.</li><li>Lower probability of data loss compared to fully asynchronous replication.</li></ul><p><strong>Best for</strong>: E-commerce applications and social media platforms where a balance between performance and consistency is important.</p><p>Database replication, particularly using the master-slave model, offers numerous benefits, including improved performance, high availability, and enhanced data redundancy. However, it also comes with challenges like replication lag and increased complexity. Understanding and implementing the appropriate data copying strategy — synchronous, asynchronous, or semi-synchronous — can help optimize your system based on your specific requirements.</p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c15ed6f866c6" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/database-replication-enhancing-availability-performance-and-reliability-c15ed6f866c6">Database Replication: Enhancing Availability, Performance, and Reliability</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Event-Driven Architecture: A Simple Guide]]></title>
            <link>https://blog.stackademic.com/event-driven-architecture-a-simple-guide-94724227cfdf?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/94724227cfdf</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Sat, 20 Jul 2024 03:02:00 GMT</pubDate>
            <atom:updated>2024-07-22T01:09:48.968Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of software development, event-driven architecture (EDA) is a powerful and flexible approach that can help build scalable, resilient, and responsive systems. But what exactly is EDA, and how does it work? Let’s break it down into simple terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rvBE8JpVDWByXC8LdgzwCA.jpeg" /></figure><h3>What is Event-Driven Architecture?</h3><p>At its core, event-driven architecture is a design pattern that revolves around the production, detection, and reaction to events. An event is any significant change or occurrence in the system, such as a user clicking a button, a payment being processed, or a sensor detecting temperature changes.</p><p>In an EDA, when an event occurs, it triggers specific actions or responses in other parts of the system. This makes the system more dynamic and responsive to changes, allowing it to adapt quickly to new situations.</p><h3>How Does Event-Driven Architecture Work?</h3><p>To understand how EDA works, let’s look at its main components:</p><ol><li><strong>Event Producers</strong>: These are the sources of events. They detect and generate events when something significant happens. For example, a user logging in, a new order being placed, or an IoT device sending data.</li><li><strong>Event Consumers</strong>: These are the entities that receive and process events. They take actions based on the events they receive. For example, updating a user interface, processing an order, or storing data in a database.</li><li><strong>Event Channel</strong>: This is the medium through which events are transmitted from producers to consumers. It could be a messaging system like Apache Kafka, RabbitMQ, or a simple event bus.</li><li><strong>Event Processing</strong>: This involves handling the events in a meaningful way. It can include filtering, transforming, aggregating, or enriching events before they reach the consumers.</li></ol><h3>Benefits of Event-Driven Architecture</h3><p>EDA offers several advantages that make it a popular choice for modern applications:</p><ol><li><strong>Scalability</strong>: EDA allows systems to scale efficiently by decoupling event producers and consumers. This means they can operate independently and scale as needed without affecting each other.</li><li><strong>Resilience</strong>: Since components are loosely coupled, failures in one part of the system don’t necessarily bring down the entire system. Consumers can retry processing events or handle failures gracefully.</li><li><strong>Flexibility</strong>: EDA makes it easy to add new features or components to the system. You can introduce new event consumers without changing the existing producers or disrupting the overall system.</li><li><strong>Responsiveness</strong>: EDA enables real-time processing of events, making the system highly responsive to changes. This is particularly useful in scenarios where timely reactions are crucial, such as fraud detection or real-time analytics.</li></ol><h3>Real-World Examples of Event-Driven Architecture</h3><p>Event-driven architecture is used in various industries and applications. Here are a few examples:</p><ul><li><strong>E-commerce</strong>: When a customer places an order, an event is generated. This event triggers actions like inventory update, payment processing, and order confirmation emails.</li><li><strong>IoT Systems</strong>: IoT devices continuously send data events (e.g., temperature readings). These events are processed in real-time to monitor conditions, trigger alerts, or perform automated actions.</li><li><strong>Financial Services</strong>: Banks and financial institutions use EDA to process transactions, detect fraud, and handle real-time trading activities.</li></ul><p>Event-driven architecture is a powerful design pattern that enables building dynamic, scalable, and resilient systems. By focusing on events and reactions, EDA allows developers to create applications that are responsive to real-time changes and can adapt quickly to new requirements.</p><p>Whether you’re developing an e-commerce platform, an IoT system, or a financial application, EDA can provide the flexibility and scalability needed to handle complex, real-time interactions. Embracing event-driven principles can help you build modern applications that meet the demands of today’s fast-paced digital world.</p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94724227cfdf" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/event-driven-architecture-a-simple-guide-94724227cfdf">Event-Driven Architecture: A Simple Guide</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Architecture of Apache Kafka: A Robust Message Queue Solution]]></title>
            <link>https://blog.stackademic.com/the-architecture-of-apache-kafka-a-robust-message-queue-solution-4ea2694cb0a3?source=rss-643b80a629e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ea2694cb0a3</guid>
            <category><![CDATA[message-queue]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Yasith Wimukthi]]></dc:creator>
            <pubDate>Wed, 10 Jul 2024 05:44:19 GMT</pubDate>
            <atom:updated>2024-07-11T00:05:16.327Z</atom:updated>
            <content:encoded><![CDATA[<p>In our previous blog, we delved into the concept of message queues. Today, let’s explore the architecture of Apache Kafka, a powerful tool used as a message queue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*kM_cRlgbrRKG5-zT97qF1Q.jpeg" /></figure><h3>Why Apache Kafka?</h3><p>When implementing a system, we often need to efficiently process a large volume of data generated from user interactions, system logs, and operational metrics. Apache Kafka was introduced by LinkedIn as a solution to this challenge. Initially, Kafka used a push model where the broker pushed data to the consumer. However, it later transitioned to a pull model, which proved to be more suitable for Kafka’s needs.</p><h3>The Push vs. Pull Model</h3><p>In the early push model, brokers were responsible for delivering messages to consumers. While this worked in some scenarios, it often led to bottlenecks and inefficiencies, especially when consumer processing speeds varied. The pull model, on the other hand, allows consumers to request messages at their own pace. This transition enabled Kafka to handle a larger number of consumers and better manage varying processing speeds, significantly enhancing its scalability and performance.</p><h3>Key Components of Kafka Architecture</h3><h3>1. Messages</h3><p>In Kafka, a message is the basic unit of data. You can think of it as similar to a row in a database. Messages may include an optional metadata component called a key. This key can be used for more control in partitioning. Messages with the same key are sent to the same partition using consistent hashing. Instead of an explicit message ID, Kafka uses a logical offset, eliminating the need for an index structure to map IDs.</p><p>Messages in Kafka are stored in a binary format, which ensures efficient storage and transmission. Each message consists of a payload (the actual data) and an offset (a unique identifier within the partition). This structure helps Kafka maintain high throughput and low latency.</p><h3>2. Topics and Partitions</h3><p>Kafka organizes messages into topics. Each topic is divided into several partitions, providing redundancy and scalability. These partitions can be spread across multiple servers, allowing for horizontal scaling.</p><p><strong>Topics</strong> act as categories or feed names to which messages are published. Producers send data to topics, and consumers read from topics. This decoupling of producers and consumers allows for greater flexibility and fault tolerance.</p><p><strong>Partitions</strong> within a topic enable Kafka to parallelize processing. Each partition is an ordered, immutable sequence of messages that is continually appended to. Partitions allow Kafka to scale horizontally by distributing data across multiple servers. This distribution enhances Kafka’s fault tolerance, as the failure of one server does not affect the entire system.</p><h3>3. Producers</h3><p>Producers are clients that publish messages to topics. Typically, producers balance messages evenly across topics. However, in some cases, they can direct a message to a specific partition.</p><p>Producers have the flexibility to choose the partitioning strategy. They can distribute messages using a round-robin approach or based on the message key, ensuring that related messages are processed together. This capability is crucial for maintaining data consistency and order.</p><h3>4. Consumers</h3><p>Consumers are clients that pull and consume messages from topics. They use offsets to track the messages they’ve consumed. Multiple consumers can join together to form a consumer group. Within a consumer group, only one consumer can access a particular partition, ensuring coordinated consumption.</p><p>This consumer group mechanism provides Kafka with a powerful way to achieve parallel processing and fault tolerance. If a consumer fails, the load is automatically distributed among the remaining consumers in the group. This ensures high availability and reliability.</p><h3>5. Brokers</h3><p>A broker is essentially a Kafka server that stores messages from producers. Each broker has a unique ID and can handle multiple topics and partitions. Brokers also manage data replication to ensure reliability.</p><p>Brokers are responsible for maintaining message logs, processing consumer requests, and ensuring data durability through replication. Each broker can lead one or more partitions and replicate data to other brokers, providing redundancy and fault tolerance.</p><h3>6. Clusters</h3><p>A cluster is formed by combining multiple brokers. This setup handles load balancing and data replication, ensuring that the system remains efficient and resilient.</p><p>Clusters enable Kafka to scale out by adding more brokers, which distribute the data and processing load. This distributed architecture allows Kafka to handle massive amounts of data and sustain high throughput, making it suitable for large-scale data processing applications.</p><h3>7. Zookeeper</h3><p>Zookeeper is a distributed coordination service used by Kafka to manage metadata and cluster state. It tracks brokers, topics, partitions, and their states, ensuring smooth operation and coordination within the cluster.</p><p>Zookeeper handles critical functions such as leader election for partitions, configuration management, and synchronization. It ensures that Kafka operates as a cohesive, fault-tolerant system, even in the face of broker failures.</p><p>Apache Kafka’s architecture is designed to efficiently handle large volumes of data through its robust components. By understanding these components and their roles, you can better appreciate how Kafka serves as a reliable and scalable message queue solution. Whether you’re dealing with user interactions, system logs, or operational metrics, Kafka provides a streamlined approach to data processing, making it an invaluable tool in modern data architecture.</p><p>Kafka’s ability to scale horizontally, handle high-throughput data streams, and provide fault tolerance makes it an ideal choice for a wide range of applications. From real-time analytics and monitoring to log aggregation and event sourcing, Kafka’s versatile architecture supports various use cases, ensuring efficient and reliable data processing across your organization.</p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ea2694cb0a3" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/the-architecture-of-apache-kafka-a-robust-message-queue-solution-4ea2694cb0a3">The Architecture of Apache Kafka: A Robust Message Queue Solution</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>