<?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 Preethi Varsha M on Medium]]></title>
        <description><![CDATA[Stories by Preethi Varsha M on Medium]]></description>
        <link>https://medium.com/@preethivarsha1812?source=rss-861dfefceeca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*M2sSKuM3mqgb8nsl7ZHudQ.jpeg</url>
            <title>Stories by Preethi Varsha M on Medium</title>
            <link>https://medium.com/@preethivarsha1812?source=rss-861dfefceeca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:10:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@preethivarsha1812/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[Interview-level - Multi Threading coding problems]]></title>
            <link>https://medium.com/@preethivarsha1812/interview-level-multi-threading-coding-problems-1602ed46927a?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/1602ed46927a</guid>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 07:56:41 GMT</pubDate>
            <atom:updated>2026-11-26T07:56:41.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ht-34_-rqqjpmulQofyhgg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*7nkGsmN6BsqupSRD9GrpPQ.png" /><figcaption>Problems suggested</figcaption></figure><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1602ed46927a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deadlocks and concurrency utilities]]></title>
            <link>https://medium.com/@preethivarsha1812/deadlocks-and-concurrency-utilities-5faf1ff27ad0?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/5faf1ff27ad0</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[deadlock]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 07:55:47 GMT</pubDate>
            <atom:updated>2026-11-26T07:55:47.261Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N83pKhFTDXmxmU_PiOYaXw.png" /></figure><h3>Deadlocks</h3><p>A deadlock happens when two or more threads wait indefinitely for resources held by each other.</p><p>Consider this:</p><pre>class DeadlockExample {<br>    private final Object lock1 = new Object();<br>    private final Object lock2 = new Object();<br><br>    public void method1() {<br>        synchronized (lock1) {<br>            synchronized (lock2) {<br>                System.out.println(&quot;Thread 1&quot;);<br>            }<br>        }<br>    }<br>    public void method2() {<br>        synchronized (lock2) {<br>            synchronized (lock1) {<br>                System.out.println(&quot;Thread 2&quot;);<br>            }<br>        }<br>    }<br>}</pre><p>Suppose:</p><ul><li>Thread 1 acquires lock1.</li><li>Thread 2 acquires lock2.</li><li>Thread 1 waits for lock2.</li><li>Thread 2 waits for lock1.</li></ul><p>Neither can proceed.</p><p><strong>Deadlock cycle</strong></p><p><strong>Thread 1</strong></p><p>Holds Lock A</p><p><strong>Waits for Lock B</strong></p><p><strong>Thread 2</strong></p><p>Holds Lock B</p><p><strong>Waits for Lock A</strong></p><p>Neither thread can proceed</p><h3>Four necessary conditions for deadlock</h3><p>All four must be present for a traditional resource deadlock:</p><ol><li><strong>Mutual exclusion:</strong> A resource can be held by only one thread at a time.</li><li><strong>Hold and wait:</strong> A thread holds one resource while waiting for another.</li><li><strong>No preemption:</strong> Resources cannot be forcibly taken away.</li><li><strong>Circular wait:</strong> Threads form a circular chain of resource dependencies.</li></ol><h3>How do we prevent deadlocks?</h3><p><strong>1. Maintain a consistent lock ordering.</strong></p><p>Always acquire Lock A before Lock B.</p><pre>synchronized (lock1) {<br>    synchronized (lock2) {<br>        // Critical section<br>    }<br>}</pre><p>Ensure every code path follows the same order.</p><p><strong>2. Use timed lock acquisition.</strong></p><pre>if (lock.tryLock(2, TimeUnit.SECONDS)) {<br>    try {<br>        // Critical section<br>    } finally {<br>        lock.unlock();<br>    }<br>}</pre><p><strong>3. Avoid holding locks unnecessarily.</strong></p><p>Keep critical sections small. Avoid calling slow external services while holding a lock.</p><p><strong>4. Avoid nested locks when possible.</strong></p><p>This reduces the possibility of circular dependencies.</p><h3>Deadlock vs starvation vs livelock</h3><p>Concept</p><p>Meaning</p><p>Deadlock</p><p>Threads are stuck waiting for each other</p><p>Starvation</p><p>A thread cannot get sufficient CPU time or resources</p><p>Livelock</p><p>Threads remain active but keep reacting to each other without making progress</p><p>These distinctions are frequently tested.</p><h3>ThreadLocal</h3><p>ThreadLocal gives each thread its own independent copy of a variable.</p><pre>class UserContext {<br>    private static final ThreadLocal&lt;String&gt; userId =<br>            new ThreadLocal&lt;&gt;();<br>public static void setUser(String id) {<br>        userId.set(id);<br>    }<br>    public static String getUser() {<br>        return userId.get();<br>    }<br>    public static void clear() {<br>        userId.remove();<br>    }<br>}</pre><p>Imagine two request threads:</p><ul><li>Thread 1 stores user ID USER_101.</li><li>Thread 2 stores user ID USER_202.</li></ul><p>Each thread reads its own value.</p><p>Common use cases:</p><ul><li>Request context.</li><li>Trace IDs.</li><li>Legacy APIs requiring thread-specific state.</li><li>Per-thread formatting or context.</li></ul><blockquote><strong>Important backend consideration:</strong> Thread pools reuse threads. If you store request-specific data in a ThreadLocal and forget to call remove(), a later request handled by that same thread may see stale data. It can also cause memory retention.</blockquote><blockquote>Always clean up in a finally block or use an appropriate request-context mechanism.</blockquote><h3>CountDownLatch vs CyclicBarrier vs Semaphore</h3><p>These are concurrency utilities that solve different coordination problems.</p><h3>A. CountDownLatch</h3><p>One or more threads wait until a specified number of events have occurred.</p><pre>CountDownLatch latch = new CountDownLatch(3);</pre><pre>Runnable task = () -&gt; {<br>    System.out.println(&quot;Worker completed&quot;);<br>    latch.countDown();<br>};</pre><pre>Thread t1 = new Thread(task);<br>Thread t2 = new Thread(task);<br>Thread t3 = new Thread(task);</pre><pre>t1.start();<br>t2.start();<br>t3.start();</pre><pre>latch.await();</pre><pre>System.out.println(&quot;All workers completed&quot;);</pre><p>The main thread waits until the count reaches zero.</p><p>A CountDownLatch cannot be reset.</p><h3>B. CyclicBarrier</h3><p>Multiple threads wait for one another to reach a common point.</p><pre>CyclicBarrier barrier = new CyclicBarrier(3);</pre><pre>Runnable task = () -&gt; {<br>    try {<br>        System.out.println(&quot;Phase 1 completed&quot;);</pre><pre>        barrier.await();</pre><pre>        System.out.println(&quot;Phase 2 started&quot;);<br>    } catch (Exception e) {<br>        e.printStackTrace();<br>    }<br>};</pre><p>The barrier releases the participating threads when all three arrive. It can be reused for another phase.</p><h3>C. Semaphore</h3><p>Controls how many threads can access a resource simultaneously.</p><p>Utility</p><p>Main purpose</p><p>Reusable?</p><p>CountDownLatch</p><p>Wait for events or tasks to complete</p><p>No</p><p>CyclicBarrier</p><p>Synchronize a group at a common point</p><p>Yes</p><p>Semaphore</p><p>Limit concurrent access with permits</p><p>Yes</p><p><strong>Easy way to remember:</strong></p><ul><li>Latch: wait until the count reaches zero.</li><li>Barrier: wait until everyone reaches the same point.</li><li>Semaphore: limit how many can enter.</li></ul><h3>20. ReadWriteLock</h3><p>Sometimes many threads need to read shared data, but only one thread should modify it.</p><p>Using a normal exclusive lock for all operations can unnecessarily restrict concurrent reads.</p><p>ReentrantReadWriteLock provides separate read and write locks.</p><pre>import java.util.concurrent.locks.*;</pre><pre>class SharedData {<br>    private final ReadWriteLock lock =<br>            new ReentrantReadWriteLock();</pre><pre>    private int value = 0;</pre><pre>    public int read() {<br>        lock.readLock().lock();<br>        try {<br>            return value;<br>        } finally {<br>            lock.readLock().unlock();<br>        }<br>    }</pre><pre>    public void update(int newValue) {<br>        lock.writeLock().lock();<br>        try {<br>            value = newValue;<br>        } finally {<br>            lock.writeLock().unlock();<br>        }<br>    }<br>}</pre><ul><li>Multiple readers can hold the read lock together.</li><li>A writer gets exclusive access.</li><li>Readers cannot enter while a writer holds the write lock.</li></ul><p>Useful when reads are frequent and writes are relatively infrequent.</p><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5faf1ff27ad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Concurrent collections]]></title>
            <link>https://medium.com/@preethivarsha1812/concurrent-collections-1c21f2a581a1?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c21f2a581a1</guid>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[concurrency]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 05:40:35 GMT</pubDate>
            <atom:updated>2026-11-26T05:40:35.819Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8wv-J67O1ZYoUeRQn3eHew.png" /><figcaption>concurrent</figcaption></figure><p>Normal Java collections such as HashMap, ArrayList and HashSet are not designed for concurrent modification by multiple threads without external synchronization.</p><p>Java provides concurrent alternatives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*OkS7fTehWAw8sQK_-5TueQ.png" /></figure><h3>A. ConcurrentHashMap</h3><pre>ConcurrentHashMap&lt;String, Integer&gt; map = new ConcurrentHashMap&lt;&gt;();<br><br>map.put(&quot;India&quot;, 100);<br>map.put(&quot;USA&quot;, 200);<br>map.putIfAbsent(&quot;India&quot;, 300);<br>map.compute(&quot;India&quot;, (key, value) -&gt; value + 1);</pre><p>Why not simply use Collections.synchronizedMap()?</p><p>A synchronized map typically synchronizes individual map operations using a common lock. ConcurrentHashMap is designed for higher concurrent access, allowing many reads and updates to proceed concurrently.</p><p>Modern Java’s ConcurrentHashMap uses techniques including CAS and synchronized locking of individual bins in certain update situations. It does not lock the entire map for every operation.</p><p><strong>Important interview points:</strong></p><ul><li><em>Does not allow null keys or null values.</em></li><li><em>Provides thread-safe individual operations.</em></li><li><em>Iterators are weakly consistent rather than fail-fast.</em></li><li><em>Compound workflows may still need atomic map methods such as </em><em>compute() or external coordination.</em></li></ul><p>For example, this is not an atomic check-then-act operation:</p><pre>if (!map.containsKey(&quot;India&quot;)) {<br>    map.put(&quot;India&quot;, 100);<br>}</pre><p>Prefer:</p><pre>map.putIfAbsent(&quot;India&quot;, 100);</pre><h3>B. CopyOnWriteArrayList</h3><pre>CopyOnWriteArrayList&lt;String&gt; users =<br>        new CopyOnWriteArrayList&lt;&gt;();<br><br>users.add(&quot;User1&quot;);<br>users.add(&quot;User2&quot;);</pre><p>When a modification happens, it creates a new copy of the underlying array.</p><p>Useful when:</p><ul><li>Reads are frequent.</li><li>Writes are relatively rare.</li><li>Iteration should not be disrupted by concurrent modifications.</li></ul><p>Not suitable for heavily write-intensive workloads because copying the array is expensive.</p><h3>C. ConcurrentLinkedQueue</h3><p>A non-blocking thread-safe queue.</p><p>Useful when multiple threads need to add and remove elements without waiting for a queue to become available.</p><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c21f2a581a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CompletableFuture and Asynchronous programming]]></title>
            <link>https://medium.com/@preethivarsha1812/completablefuture-and-asynchronous-programming-2f536fdd749c?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f536fdd749c</guid>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 18:01:28 GMT</pubDate>
            <atom:updated>2026-11-25T18:01:28.751Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zj1vxpILHNOR8b3aV9Pvew.png" /></figure><h3>Future</h3><p>A Future represents the result of an asynchronous computation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*8HDTUFJFggA39tqXZV5X4Q.png" /></figure><blockquote><strong>Important:</strong> Calling get() before the task completes blocks the calling thread.</blockquote><h3>13. CompletableFuture</h3><p>CompletableFuture is more powerful than a basic Future because it supports asynchronous pipelines, transformations, combinations and exception handling.</p><p>Imagine a payment application needs to:</p><ol><li>Fetch customer details.</li><li>Fetch account details.</li><li>Combine both results.</li><li>Calculate an eligibility result.</li></ol><p>Instead of performing independent calls sequentially, we can execute them asynchronously.</p><pre>CompletableFuture&lt;String&gt; customer =<br>    CompletableFuture.supplyAsync(() -&gt; {<br>        return &quot;Customer 1&quot;;<br>    });</pre><pre>CompletableFuture&lt;String&gt; account =<br>    CompletableFuture.supplyAsync(() -&gt; {<br>        return &quot;Savings Account&quot;;<br>    });</pre><pre>CompletableFuture&lt;String&gt; result =<br>    customer.thenCombine(account,<br>        (c, a) -&gt; c + &quot; - &quot; + a<br>    );<br>System.out.println(result.join());</pre><h3>Important methods</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*EqzO4462w3DY7KIGrr1F-Q.png" /></figure><h4>thenApply() vs thenCompose()</h4><blockquote>This is an important interview question.</blockquote><p>thenApply() transforms a value.</p><pre>CompletableFuture&lt;String&gt; name =<br>    CompletableFuture.completedFuture(&quot;xxxxx&quot;);<br><br>CompletableFuture&lt;Integer&gt; length =<br>    name.thenApply(String::length);</pre><p>thenCompose() chains an operation that itself returns a CompletableFuture.</p><pre>CompletableFuture&lt;String&gt; user =<br>    CompletableFuture.completedFuture(&quot;user123&quot;);<br><br>CompletableFuture&lt;String&gt; details =<br>    user.thenCompose(id -&gt;<br>        fetchUserDetailsAsync(id)<br>    );</pre><p>Think of it this way:</p><ul><li>thenApply: value → value.</li><li>thenCompose: value → future → flattened future.</li></ul><h4>thenCombine() vs thenCompose()</h4><ul><li>thenCombine() is for two independent asynchronous tasks.</li><li>thenCompose() is for dependent asynchronous tasks.</li></ul><h3>Exception handling</h3><pre>CompletableFuture&lt;String&gt; result =<br>    CompletableFuture.supplyAsync(() -&gt; {<br>        if (true) {<br>            throw new RuntimeException(&quot;Service failed&quot;);<br>        }<br>        return &quot;Success&quot;;<br>    }).exceptionally(ex -&gt; &quot;Fallback response&quot;);</pre><blockquote><strong>One production detail</strong></blockquote><blockquote>By default, asynchronous methods without an explicit executor generally use the common ForkJoinPool. For blocking database or network operations, choose a deliberately configured executor rather than blindly using the common pool.</blockquote><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f536fdd749c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inter-thread communication and producer-consumer]]></title>
            <link>https://medium.com/@preethivarsha1812/inter-thread-communication-and-producer-consumer-3d87ff91728d?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d87ff91728d</guid>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[threads]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 18:00:18 GMT</pubDate>
            <atom:updated>2026-11-25T18:00:18.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z3YjFhdH9lWyjZc2wxVmMg.png" /><figcaption>Communication</figcaption></figure><h3>Inter-thread communication: wait, notify &amp; notifyAll</h3><p>Sometimes threads need to coordinate instead of merely protecting shared data.</p><p>For example:</p><ul><li><em>Producer creates an item.</em></li><li><em>Consumer waits until an item is available.</em></li><li><em>Consumer processes the item.</em></li></ul><p>Java provides wait(), notify() and notifyAll() for intrinsic monitor coordination.</p><pre>class SharedResource {<br>    private boolean available = false;<br>    <br>    public synchronized void produce()<br>            throws InterruptedException {<br>        while (available) {<br>            wait();<br>        }<br>        System.out.println(&quot;Produced item&quot;);<br>        available = true;<br>        notifyAll();<br>    }<br>    <br>    public synchronized void consume()<br>            throws InterruptedException {<br>        while (!available) {<br>            wait();<br>        }<br>        System.out.println(&quot;Consumed item&quot;);<br>        available = false;<br>        notifyAll();<br>    }<br>}</pre><p>Why use while instead of if?</p><blockquote>Because of <strong>spurious wakeups</strong> and because another thread may change the condition before the awakened thread reacquires the lock.</blockquote><blockquote>The condition must be checked again after waking up.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*PwyxhMHkm4_cS23IB_6mmA.png" /></figure><p>Waking a thread does not mean it immediately executes. It must first reacquire the monitor.</p><h3>Condition with ReentrantLock</h3><p>Java also provides Condition, which offers monitor-like waiting and signaling with explicit locks.</p><pre>ReentrantLock lock = new ReentrantLock();<br>Condition condition = lock.newCondition();<br><br>lock.lock();<br>try {<br>    while (!conditionToProceed()) {<br>        condition.await();<br>    }<br>// Continue processing<br>} finally {<br>    lock.unlock();<br>}</pre><p>The important methods are:</p><ul><li>await()</li><li>signal()</li><li>signalAll()</li></ul><h3>Producer-consumer problem</h3><blockquote>This is a classic interview coding problem.</blockquote><blockquote>A producer generates tasks, while a consumer processes them.</blockquote><blockquote>The producer should wait if the queue is full. The consumer should wait if the queue is empty.</blockquote><p>Java provides BlockingQueue, which handles this coordination for us.</p><pre>import java.util.concurrent.*;<br><br>public class ProducerConsumer {<br>    <br>  public static void main(String[] args) {<br>    <br>    BlockingQueue&lt;Integer&gt; queue = new ArrayBlockingQueue&lt;&gt;(5);<br><br>    ExecutorService executor = Executors.newFixedThreadPool(2);<br>        executor.submit(() -&gt; {<br>            try {<br>                for (int i = 1; i &lt;= 10; i++) {<br>                    queue.put(i);<br>                    System.out.println(&quot;Produced: &quot; + i);<br>                }<br>            } catch (InterruptedException e) {<br>                Thread.currentThread().interrupt();<br>            }<br>        });<br>        executor.submit(() -&gt; {<br>            try {<br>                for (int i = 1; i &lt;= 10; i++) {<br>                    int value = queue.take();<br>                    System.out.println(&quot;Consumed: &quot; + value);<br>                }<br>            } catch (InterruptedException e) {<br>                Thread.currentThread().interrupt();<br>            }<br>        });<br>        executor.shutdown();<br>    }<br>}</pre><p>Important methods:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*IejutJdpAWEEwaSNmnE9hQ.png" /></figure><blockquote><strong>Interview insight:</strong> BlockingQueue is generally preferable to implementing producer-consumer coordination manually using wait() and notify().</blockquote><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d87ff91728d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ExecutorService and Thread Pools]]></title>
            <link>https://medium.com/@preethivarsha1812/executorservice-and-thread-pools-4739fbaa17e3?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/4739fbaa17e3</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[threads]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[executorservice]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 04:47:38 GMT</pubDate>
            <atom:updated>2026-11-25T04:47:38.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lp3pIE7YY00I6n9HUhpddQ.png" /><figcaption>Pools</figcaption></figure><p>So far, we created threads manually. But creating a new thread for every request or task is expensive.</p><p>A thread pool solves this by maintaining reusable worker threads.</p><p>Java provides the ExecutorService API.</p><pre>import java.util.concurrent.*;<br><br>public class Main {<br>    public static void main(String[] args) {<br>        ExecutorService executor = Executors.newFixedThreadPool(3);<br>        for (int i = 1; i &lt;= 5; i++) {<br>            int taskId = i;<br>            executor.submit(() -&gt; {<br>                System.out.println( &quot;Task &quot; + taskId + &quot; executed by &quot; +<br>                    Thread.currentThread().getName());<br>            });<br>        }<br>        executor.shutdown();<br>    }<br>}</pre><p>Here:</p><ul><li>We create a pool of three worker threads.</li><li>We submit five tasks.</li><li>At most three tasks execute simultaneously.</li><li>The remaining tasks wait in the executor’s work queue.</li><li>Threads are reused for subsequent tasks.</li></ul><p><strong>How a thread pool works</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*E_p3LBqzBN9wNQx2uGFrPg.png" /></figure><p><strong><em>Production consideration:</em></strong><em> Some convenience executors use unbounded queues or can grow their thread count substantially. For a backend service, an explicitly configured </em><em>ThreadPoolExecutor with a bounded queue and a deliberate rejection policy is often safer.</em></p><h3>ThreadPoolExecutor</h3><pre>ThreadPoolExecutor executor =<br>    new ThreadPoolExecutor(<br>        5,                      // Core threads<br>        10,                     // Maximum threads<br>        60,                     // Keep-alive time<br>        TimeUnit.SECONDS,<br>        new ArrayBlockingQueue&lt;&gt;(100),<br>        new ThreadPoolExecutor.AbortPolicy()<br>    );</pre><p>Understand these five parameters:</p><ol><li>Core pool size: workers maintained by default.</li><li>Maximum pool size: maximum number of workers.</li><li>Keep-alive time: how long excess idle workers can remain.</li><li>The unit of measurement for the time provided.</li><li>Work queue: stores tasks waiting for execution.</li><li>Rejection policy: what happens when capacity is exhausted.</li></ol><h3>Rejection policies</h3><ul><li>AbortPolicy: throws RejectedExecutionException.</li><li>CallerRunsPolicy: executes the task on the submitting thread.</li><li>DiscardPolicy: silently discards the task.</li><li>DiscardOldestPolicy: discards the oldest queued task and retries submission.</li></ul><blockquote><strong>Interview scenario: Imagine a payment backend receiving 5,000 requests per second. If the worker pool and queue are too small, tasks get rejected. If they are too large, the service may accumulate huge queues, causing latency and memory pressure.</strong></blockquote><blockquote>This is called<strong> backpressure and capacity management.</strong></blockquote><blockquote>The pool should be sized from measured service capacity and latency goals, with a bounded queue to cap memory use. When it fills, apply backpressure: reject or shed work, return a retryable response, or slow upstream producers. Monitor queue depth, rejection rate, and latency, then tune based on load tests rather than simply increasing threads.</blockquote><h3>Runnable vs Callable</h3><p>Both represent tasks, but they differ in their return values and exception handling.</p><h3>Runnable</h3><pre>Runnable task = () -&gt; { System.out.println(&quot;Processing payment&quot;); };</pre><ul><li>Does not return a result.</li><li>Cannot declare checked exceptions from its run() method.</li></ul><h3>Callable</h3><pre>Callable&lt;Integer&gt; task = () -&gt; { return 100 + 200; };</pre><ul><li>Returns a result.</li><li>Can throw checked exceptions.</li></ul><p>To execute a Callable:</p><pre>ExecutorService executor = Executors.newSingleThreadExecutor();<br><br>Future&lt;Integer&gt; future = executor.submit(task);<br>try {<br>    Integer result = future.get();<br>    System.out.println(result);<br>} catch (Exception e) {<br>    e.printStackTrace();<br>}<br>executor.shutdown();</pre><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4739fbaa17e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Volatile & Atomic Variables]]></title>
            <link>https://medium.com/@preethivarsha1812/volatile-atomic-variables-830eabe498da?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/830eabe498da</guid>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[concurrency]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 19:14:49 GMT</pubDate>
            <atom:updated>2026-11-24T19:14:49.592Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dz1SikavGS05Hr2JfANw1Q.png" /><figcaption>Atomic</figcaption></figure><blockquote>This is particularly important because interviewers often ask why volatile cannot replace synchronized.</blockquote><h3>What does volatile do?</h3><p>volatile ensures visibility of writes to a variable across threads and establishes a happens-before relationship between a write and subsequent reads of that variable.</p><p>Example:</p><pre>class Worker {<br>    private volatile boolean running = true;<br>    public void work() {<br>        while (running) {<br>            // Keep working<br>        }<br>    }<br>    public void stop() {<br>        running = false;<br>    }<br>}</pre><p>Without volatile, the worker thread is not guaranteed to observe the updated value promptly.</p><h3>But volatile does not make compound operations atomic.</h3><pre>volatile int count = 0;<br>count++; // Still not thread-safe!</pre><p><em>Why? Because read, increment and write are separate operations.</em></p><h3>AtomicInteger</h3><pre>import java.util.concurrent.atomic.AtomicInteger;<br><br>AtomicInteger count = new AtomicInteger(0);<br>count.incrementAndGet();</pre><p>incrementAndGet() performs an atomic update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*9tkMQNrvwDpEwmUdKrQ9yA.png" /></figure><h4>How do atomic classes work internally?</h4><p>Many atomic operations use <strong>CAS (Compare-And-Set)</strong>.</p><p>CAS conceptually performs three steps:</p><ol><li>Read the current value.</li><li>Compare it with an expected value.</li><li>If it matches, update it; otherwise, retry or report failure.</li></ol><p>Example:</p><pre>AtomicInteger count = new AtomicInteger(10);<br>boolean updated = count.compareAndSet(10, 11);</pre><p>If the current value is 10, it becomes 11 and returns true. If another thread changed it first, the operation returns false.</p><p><em>CAS is a foundational concept behind lock-free algorithms.</em></p><blockquote>Interview trap</blockquote><blockquote>volatile does not make count++ thread-safe.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=830eabe498da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Synchronization, locks and monitors]]></title>
            <link>https://medium.com/@preethivarsha1812/synchronization-locks-and-monitors-7f35161bc789?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f35161bc789</guid>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[locks]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[synchronization]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 18:17:49 GMT</pubDate>
            <atom:updated>2026-11-24T18:17:49.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZ4_rOw3jD6RToTi12t0Bw.png" /><figcaption>Lock and Monitor</figcaption></figure><h3>Synchronization in Java</h3><p>Synchronization ensures that only one thread at a time executes a protected critical section for a particular monitor.</p><p>A <strong>critical section</strong> is the part of code that accesses shared mutable state and must be protected.</p><h3>A. Synchronized method</h3><pre>class Counter {<br>    private int count = 0;<br>public synchronized void increment() {<br>        count++;<br>    }<br>}</pre><p>Only one thread at a time can execute a synchronized instance method on the same object.</p><h3>B. Synchronized block</h3><pre>class Counter {<br>    private int count = 0;<br>    public void increment() {<br>        synchronized (this) {<br>            count++;<br>        }<br>    }<br>}</pre><p>The block allows you to protect only the critical section instead of the entire method.</p><h3>C. Static synchronized method</h3><pre>class Counter {<br>    private static int count = 0;<br>public static synchronized void increment() {<br>        count++;<br>    }<br>}</pre><p>This locks the Class object, not an individual instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*WxTssDuzHl9QlCiEpa0Bdg.png" /></figure><p><strong>Important:</strong> Two different objects have two different instance locks. Therefore, two threads can execute synchronized instance methods on different objects simultaneously.</p><h3>Test your understanding</h3><blockquote>Suppose we have:</blockquote><blockquote>Counter c1 = new Counter();<br>Counter c2 = new Counter();</blockquote><blockquote>Thread 1 calls c1.increment() and Thread 2 calls c2.increment().</blockquote><blockquote>They do not block each other if increment() is an instance synchronized method.</blockquote><blockquote>This is because the locks belong to different objects.</blockquote><h3>Intrinsic locks, monitors and mutexes</h3><p>These terms are closely related but not exactly interchangeable.</p><ul><li><strong>Monitor:</strong> A synchronization mechanism associated with an object in Java.</li><li><strong>Intrinsic lock:</strong> The built-in lock used by synchronized.</li><li><strong>Mutex:</strong> A mutual-exclusion mechanism that allows one thread at a time into a protected region.</li></ul><p>Java’s synchronized uses intrinsic monitor locks.</p><p>Example:</p><pre>synchronized (lock) {<br>    // Only one thread holding this lock can execute this protected region.<br>}</pre><p>Java also provides explicit locking APIs.</p><h4>synchronized vs ReentrantLock</h4><pre>import java.util.concurrent.locks.ReentrantLock;<br>class Counter {<br>    private int count = 0;<br>    private final ReentrantLock lock = new ReentrantLock();<br>    public void increment() {<br>        lock.lock();<br>        try {<br>            count++;<br>        } finally {<br>            lock.unlock();<br>        }<br>    }<br>}</pre><p>Why use finally?</p><p>Because if an exception occurs inside the critical section, the lock must still be released.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*VReZ0c1J9nVMKdFZrHZXbw.png" /></figure><h4>What does reentrant mean?</h4><p>A lock is reentrant when a thread that already owns it can acquire it again without blocking itself.</p><pre>class Example {<br>    public synchronized void methodA() {<br>        methodB();<br>    }<br>public synchronized void methodB() {<br>        System.out.println(&quot;Executing B&quot;);<br>    }<br>}</pre><p>Both methods synchronize on the same object.</p><p>The thread can enter methodB() because it already owns that object&#39;s monitor.</p><h3>Mutex vs Semaphore</h3><blockquote><em>This is a classic concurrency interview topic.</em></blockquote><p>A <strong>mutex</strong> provides exclusive access to a resource. A <strong>semaphore</strong> controls access using a permit count.</p><p>Java’s Semaphore implementation:</p><pre>import java.util.concurrent.Semaphore;<br>class DatabaseConnectionPool {<br>    private final Semaphore semaphore = new Semaphore(3);<br>    public void accessDatabase() throws InterruptedException {<br>        semaphore.acquire();<br>        try {<br>            System.out.println(&quot;Using database connection&quot;);<br>            Thread.sleep(1000);<br>        } finally {<br>            semaphore.release();<br>        }<br>    }<br>}</pre><p>Here, only three threads can hold permits simultaneously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*HUHfmj5yJnMK1LeQH7hfkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*psR4Nq-GeHA7LbL6EeUTAw.png" /></figure><p>Java’s Semaphore is not an ownership-enforcing mutex: a different thread can release a permit. Also, a binary semaphore with one permit is not identical to an ownership-based mutex.</p><blockquote><strong>Interview use case:</strong></blockquote><blockquote>If you have 100 incoming requests but only 10 available resources, how do you limit concurrent access? A semaphore with 10 permits is one possible solution.</blockquote><blockquote><strong>Practice with :</strong></blockquote><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f35161bc789" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Race conditions and thread safety]]></title>
            <link>https://medium.com/@preethivarsha1812/race-conditions-and-thread-safety-1cd5cf7db679?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cd5cf7db679</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[race-condition]]></category>
            <category><![CDATA[threads]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 12:48:50 GMT</pubDate>
            <atom:updated>2026-11-24T18:15:31.414Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qska32nxDbxV-OyluAbdVg.png" /><figcaption>Race XD</figcaption></figure><h3>Race conditions — one of the most important concepts</h3><p>A race condition occurs when multiple threads access shared data concurrently and the result depends on the order in which their operations execute.</p><p>Consider this example:</p><pre>class Counter {<br>    int count = 0;<br>    void increment() {<br>        count++;<br>    }<br>}</pre><p>Now execute increment() from two threads, each 1,000 times.</p><pre>Counter counter = new Counter();<br>Runnable task = () -&gt; {<br>    for (int i = 0; i &lt; 1000; i++) {<br>        counter.increment();<br>    }<br>};<br>Thread t1 = new Thread(task);<br>Thread t2 = new Thread(task);<br>t1.start();<br>t2.start();<br>t1.join();<br>t2.join();<br>System.out.println(counter.count);</pre><p>Expected output: 2000.</p><p>But the actual result can be less than 2000.</p><p><strong>Why? Because </strong>count++<strong> is not an atomic operation.</strong></p><p>It consists of three conceptual steps:</p><ol><li>Read the current value.</li><li>Increment it.</li><li>Write the updated value.</li></ol><p>Imagine both threads read the value 10 before either writes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*tTqXU1C3PuFT70zplNcnZA.png" /></figure><p>This is called a <strong>lost update</strong>.</p><h4>How do we prevent race conditions?</h4><p>There are three common approaches:</p><ul><li>Synchronization using synchronized.</li><li>Explicit locks such as ReentrantLock.</li><li>Atomic classes such as AtomicInteger.</li></ul><p><a href="https://medium.com/@preethivarsha1812/multi-threading-in-java-beginner-066bddbada72">We’ll understand each.</a></p><h3>Thread safety</h3><p>A piece of code is thread-safe if it behaves correctly when multiple threads access it concurrently.</p><p>Consider a Spring Boot example:</p><pre>@Service<br>public class TransactionService {<br>private int transactionCount = 0;<br>    public void processTransaction() {<br>        transactionCount++;<br>    }<br>}</pre><p>Spring services are singleton-scoped by default. Multiple request-handling threads may invoke this same object.</p><p>That means transactionCount is shared.</p><p>The code is not thread-safe.</p><p><strong><em>A common interview trap:</em></strong><em> A singleton Spring bean is not automatically thread-safe. Thread safety depends on how its shared state is accessed.</em></p><p>A safer option for a counter is:</p><pre>private final AtomicInteger transactionCount = new AtomicInteger(0);<br>public void processTransaction() {<br>    transactionCount.incrementAndGet();<br>}</pre><p>If the operation involves several related fields or multiple steps that must happen together, an atomic counter alone may not be enough.</p><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cd5cf7db679" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thread fundamentals and lifecycle]]></title>
            <link>https://medium.com/womenintechnology/thread-fundamentals-and-lifecycle-0326f6c95399?source=rss-861dfefceeca------2</link>
            <guid isPermaLink="false">https://medium.com/p/0326f6c95399</guid>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[threads]]></category>
            <dc:creator><![CDATA[Preethi Varsha M]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 04:50:13 GMT</pubDate>
            <atom:updated>2026-11-24T18:14:52.159Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EX3fGE6H32gjkmFG3Aca9A.png" /><figcaption>Threads</figcaption></figure><h3>1. Process vs thread</h3><p>A <strong>process</strong> is an executing program with its own memory space and resources.</p><p>A <strong>thread</strong> is an execution unit within a process. Multiple threads in the same process share its heap and process resources, but each thread has its own stack and execution state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*QEPwuzEl6LgWieJWIAK57A.png" /></figure><p><strong>Example:</strong> In a Spring Boot application, multiple incoming HTTP requests can be handled by different server threads. They share application-level objects, such as singleton service instances.</p><p>This is why thread safety matters in backend development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*h7M9BeiBqyynPSRZkQwGbg.png" /></figure><p><strong>Interview question:</strong> If two threads modify the same object, what can go wrong?</p><p>They may overwrite each other’s updates, observe inconsistent state, or execute operations in an unexpected order.</p><h3>2. Creating threads in Java</h3><p>There are three common ways to define concurrent work.</p><h3>A. Extending Thread</h3><pre>class MyThread extends Thread {<br>    @Override<br>    public void run() {<br>        System.out.println(&quot;Running: &quot; +<br>            Thread.currentThread().getName());<br>    }<br>}<br>public class Main {<br>    public static void main(String[] args) {<br>        MyThread t = new MyThread();<br>        t.start();<br>    }<br>}</pre><h3>B. Implementing Runnable</h3><pre>class MyTask implements Runnable {<br>    @Override<br>    public void run() {<br>        System.out.println(&quot;Task executing&quot;);<br>    }<br>}<br><br>public class Main {<br>    public static void main(String[] args) {<br>        Thread t = new Thread(new MyTask());<br>        t.start();<br>    }<br>}</pre><h3>C. Using a lambda</h3><pre>Thread t = new Thread(() -&gt; {<br>    System.out.println(&quot;Executing task&quot;);<br>});<br>t.start();</pre><p><strong>Which is preferred?</strong> Runnable separates the task from the thread that executes it. In production applications, you will usually submit tasks to an executor rather than create threads manually.</p><h3>start() vs run()</h3><p>This is a very common interview question.</p><pre>Thread t = new Thread(() -&gt;<br>    System.out.println(&quot;Hello&quot;)<br>);<br><br>t.run();   // Executes on the current thread<br>t.start(); // Starts a new thread</pre><ul><li>run() is an ordinary method call.</li><li>start() asks the JVM to start a new thread; that thread subsequently executes run().</li><li>A thread can be started only once. Calling start() again throws IllegalThreadStateException.</li></ul><p><em>Remember </em><em>start() creates concurrent execution; </em><em>run() by itself does not.</em></p><h3>3. Java thread lifecycle</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*adLXO1bi-wxP4LYy2SMNnQ.png" /><figcaption>Thread Life cycle in Java</figcaption></figure><p>Java defines six thread states through Thread.State.</p><p>Example:</p><pre>Thread t = new Thread(() -&gt; {<br>    try {<br>        Thread.sleep(2000);<br>    } catch (InterruptedException e) {<br>        Thread.currentThread().interrupt();<br>    }<br>});<br>System.out.println(t.getState()); // NEW<br>t.start();<br>System.out.println(t.getState()); // May be RUNNABLE</pre><p>The state observed immediately after start() is timing-dependent.</p><h3>4. Important thread methods</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*BjMFpIWM-4CySe6MUbym1w.png" /><figcaption>methods of thread</figcaption></figure><h3>join() — very important</h3><p>Suppose you need to ensure that two worker threads finish before calculating the final result.</p><pre>Thread t1 = new Thread(() -&gt; {<br>    System.out.println(&quot;Task 1&quot;);<br>});<br>Thread t2 = new Thread(() -&gt; {<br>    System.out.println(&quot;Task 2&quot;);<br>});<br><br>t1.start();<br>t2.start();<br><br>t1.join();<br>t2.join();<br><br>System.out.println(&quot;Both tasks completed&quot;);</pre><p>Without join(), the main thread can print the final message before either worker finishes.</p><h3>sleep() vs wait()</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*7enwsxlLHNBFO2d68ZtXfw.png" /><figcaption>sleep( ) vs wait( )</figcaption></figure><p>Example:</p><pre>synchronized (lock) {<br>    lock.wait();<br>}</pre><p><em>Calling </em><em>wait() without owning the monitor causes </em><em>IllegalMonitorStateException</em></p><p><strong>Practice with :</strong></p><p><a href="https://preethivarsham.github.io/concept-quiz-lab/quizzes/java-concurrency.html">Java Concurrency Lab - Concept Quiz Lab</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0326f6c95399" width="1" height="1" alt=""><hr><p><a href="https://medium.com/womenintechnology/thread-fundamentals-and-lifecycle-0326f6c95399">Thread fundamentals and lifecycle</a> was originally published in <a href="https://medium.com/womenintechnology">Women in Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>