<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Java on Tech Blog</title>
    <link>https://yashsachdeva.com/tags/java/</link>
    <description>Recent content in Java on Tech Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>© 2026 Yash Sachdeva</copyright>
    <lastBuildDate>Wed, 08 Apr 2026 20:04:08 +0530</lastBuildDate><atom:link href="https://yashsachdeva.com/tags/java/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Mastering Concurrency In Java - Part 4: Deep Dives and Modern Patterns</title>
      <link>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-4-deep-dives-and-modern-patterns/</link>
      <pubDate>Wed, 08 Apr 2026 20:04:08 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-4-deep-dives-and-modern-patterns/</guid>
      <description>&lt;p&gt;In &lt;a href=&#34;https://yashsachdeva.com/posts/2026/04/concurrency-part-1/&#34; &gt;Part 1&lt;/a&gt;, &lt;a href=&#34;https://yashsachdeva.com/posts/2026/04/concurrency-part-2/&#34; &gt;Part 2&lt;/a&gt;, and &lt;a href=&#34;https://yashsachdeva.com/posts/2026/04/concurrency-part-3/&#34; &gt;Part 3&lt;/a&gt;, we covered hazards, primitives, and execution models. In this final part, we will focus on structured concurrency, fan-out/fan-in, fail-fast cancellations, timeout propagation, resource scoping, and observability with thread dumps and Java Flight Recorder (JFR), emphasizing when to choose which pattern.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Mastering Concurrency In Java - Part 3: Execution Models</title>
      <link>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-3-execution-models/</link>
      <pubDate>Tue, 07 Apr 2026 20:04:08 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-3-execution-models/</guid>
      <description>&lt;p&gt;In &lt;a href=&#34;https://yashsachdeva.com/posts/2026/04/concurrency-part-1/&#34; &gt;Part 1&lt;/a&gt; and &lt;a href=&#34;https://yashsachdeva.com/posts/2026/04/concurrency-part-2/&#34; &gt;Part 2&lt;/a&gt;, we covered the fundamentals and building blocks of concurrency. In this part, we will discuss the execution models of concurrency - classic thread pools, task queues, Future/Callable, CompletableFuture, and, from Java 21+, virtual threads and virtual-thread-per-task executors. Choosing among them is ultimately about latency, throughput, and operational simplicity, not about syntax.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Mastering Concurrency In Java - Part 2: The Fundamentals</title>
      <link>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-2-the-fundamentals/</link>
      <pubDate>Mon, 06 Apr 2026 20:04:08 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-2-the-fundamentals/</guid>
      <description>&lt;p&gt;In &lt;a href=&#34;https://yashsachdeva.com/posts/2026/04/concurrency-part-1/&#34; &gt;Part 1&lt;/a&gt;, we discussed the core concurrency hazards and control concepts in Java: race conditions, visibility, atomicity, deadlocks, starvation, livelock, contention, backpressure, interruption, and cancellation.&lt;/p&gt;&#xA;&lt;p&gt;In this part, we will discuss the coordination primitives - synchronized, volatile, Atomics, Locks, Semaphores, Blocking Queues, and Concurrent Collections.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Mastering Concurrency In Java - Part 1: The Fundamentals</title>
      <link>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-1-the-fundamentals/</link>
      <pubDate>Sun, 05 Apr 2026 11:26:08 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/mastering-concurrency-in-java-part-1-the-fundamentals/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;Introduction&#xA;    &lt;div id=&#34;introduction&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#introduction&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Here, we will discuss the core concurrency hazards and control concepts in Java: race conditions, visibility, atomicity, deadlocks, starvation, livelock, contention, backpressure, interruption, and cancellation.&lt;/p&gt;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;Race Conditions&#xA;    &lt;div id=&#34;race-conditions&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#race-conditions&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;A race condition occurs when the correctness of a task depends on the relative timing or interleaving of threads accessing shared mutable state. The bug is not “thread A ran before B”, it is “if they interleave in this specific way, invariants break.”&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>How to Cache?</title>
      <link>https://yashsachdeva.com/posts/how-to-cache/</link>
      <pubDate>Sat, 28 Mar 2026 08:42:23 +0530</pubDate>
      
      <guid>https://yashsachdeva.com/posts/how-to-cache/</guid>
      <description>&lt;p&gt;Modern APIs frequently access databases, or complex business logic that introduce significant latency and consume CPU and I/O resources. Without caching, every request pays the full cost of database queries, network calls, and computation. This can lead to slow response times and poor scalability as traffic  increases.&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
