<?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 Hjwasim on Medium]]></title>
        <description><![CDATA[Stories by Hjwasim on Medium]]></description>
        <link>https://medium.com/@hjwasim?source=rss-a63c1052a91c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*k5L6PwO3dVs8FdJB</url>
            <title>Stories by Hjwasim on Medium</title>
            <link>https://medium.com/@hjwasim?source=rss-a63c1052a91c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 17:51:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hjwasim/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[Understanding Java Virtual Threads: How Mounting, Unmounting, and Scheduling Improvr Scalability]]></title>
            <link>https://medium.com/@hjwasim/understanding-java-virtual-threads-how-mounting-unmounting-and-scheduling-improvr-scalability-402d5884242f?source=rss-a63c1052a91c------2</link>
            <guid isPermaLink="false">https://medium.com/p/402d5884242f</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-concurrency]]></category>
            <category><![CDATA[scalability]]></category>
            <dc:creator><![CDATA[Hjwasim]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 19:09:09 GMT</pubDate>
            <atom:updated>2026-11-09T19:09:09.471Z</atom:updated>
            <content:encoded><![CDATA[<p>Java has traditionally relied on platform threads to execute concurrent tasks. while this model works well for many applications, it becomes expensive when thousands of requests spend most of their time waiting for databases, external API or network response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7NPC_yMWKN9I_0oLcb3fmA.jpeg" /></figure><p>With the introduction of Virtual Threads in Java 21 (Project Loom), Java provides a more scalable approach to handling large numbers of concurrent tasks.</p><p>But what makes virtual threads different from traditional platform threads?</p><p>The answer lies in three important concepts:</p><ul><li>Virtual Thread Scheduler</li><li>Mounting and Unmounting</li><li>Efficient utilization of Carrier Threads</li></ul><p>Let’s explore these concepts step by step.</p><h3>1. The Problem with Traditional Platform Threads</h3><p>Imagine a Spring Boot application that handles thousands of HTTP requests.</p><p>Each request retrieves customer information from a database.</p><pre>public Customer getCustomer(Long id) {<br>  return customerRepository.findById(id).orElseThrow();<br>}</pre><p>Suppose the database take 500ms to return a response.</p><p>In the traditional thread-per-request model, a platform thread processes the incoming request and executes the database query.</p><p>While waiting for the database response, the platform thread remains blocked.</p><p><strong>Here is the important observation:</strong></p><p>The thread is not performing useful computation during this waiting period. It is simply waiting for an external system to respond.</p><p>Although the blocked thread generally consumes little CPU, it continues to occupy operating-system thread resources.</p><p>Now imagine thousands of requests arriving simultaneously.</p><p>Thousands of platform threads may be required to support all those concurrent waiting operations.The fundamental problem is not necessarily CPU usage.</p><p><strong>It is the inefficient use of expensive platform-thread resources during I/O waiting.</strong></p><h3>2. Enter Java Virtual Threads</h3><p>Virtual threads are lightweight threads managed by the Java Virtual Machine (JVM).</p><p>Unlike traditional platform threads, virtual threads are not permanently associated with individual operating-system threads.</p><p>Instead, Java uses a smaller set of platform threads, known as <strong>Carrier Threads</strong>, to execute virtual threads.</p><p>A virtual thread requires a carrier thread when it is actively executing Java code.</p><p>However, when it encounters a supported blocking operation, it can release its carrier thread.</p><p>This is where the Virtual Thread Scheduler becomes important.</p><h3>3. Understanding the Virtual Thread Scheduler</h3><p>The Virtual Thread Scheduler is responsible for scheduling virtual threads onto carrier platform threads.</p><p>By default, Java’s virtual-thread scheduler uses a ForkJoinPool-based implementation.</p><p>Its primary responsibility is to make carrier threads available to execute runnable virtual threads.</p><p>Two important operations make this possible.</p><h3>Mounting</h3><p>Mounting occurs when a virtual thread is assigned to a carrier platform thread for execution.</p><p>Conceptually:</p><pre>Virtual Thread A<br>       |<br>       | Mount<br>       v<br>Carrier Platform Thread<br>       |<br>       v<br>      CPU</pre><p>The virtual thread executes its Java code using the carrier thread.</p><h3>Unmounting</h3><p>Unmounting happens when a virtual thread encounters a supported blocking operation and no longer needs a carrier thread to execute.</p><p>Consider:</p><pre>Thread.sleep(2000);</pre><p>When a virtual thread executes this statement, it can suspend execution and release its carrier thread.</p><p>The carrier thread is then free to execute another runnable virtual thread.</p><p>Conceptually:</p><pre>Virtual Thread A<br>       |<br>       | Database / I/O Waiting<br>       v<br>     Unmount<br>       |<br>       v<br>Carrier Thread Released<br>       |<br>       v<br>Execute Virtual Thread B</pre><p>When the waiting operation completes, Virtual Thread A becomes runnable again.</p><p>The scheduler can then mount it onto an available carrier thread.</p><p>Interestingly, <strong>the virtual thread does not need to resume on the same carrier thread on which it originally started.</strong></p><p>This separation between virtual threads and carrier threads is one of the most powerful aspects of Project Loom.</p><h3>4. Let’s Understand with a Real-World Scenario</h3><p>Suppose an application receives three requests:</p><p><strong>Request A:</strong> Fetch customer details from a database.</p><p><strong>Request B:</strong> Call an external payment API.</p><p><strong>Request C:</strong> Retrieve order information.</p><p>For simplicity, assume only one carrier thread is available.</p><p>Here is how execution could happen:</p><p><strong>Step 1: Virtual Thread A starts executing.</strong></p><p>The scheduler mounts Virtual Thread A onto Carrier Thread 1.</p><p>Virtual Thread A sends a databas Ie query.</p><p><strong>Step 2: Virtual Thread A waits for the database response.</strong></p><p>Since the database operation uses supported blocking I/O, Virtual Thread A can be unmounted.</p><p>Carrier Thread 1 becomes available.</p><p><strong>Step 3: Virtual Thread B starts executing.</strong></p><p>The scheduler mounts Virtual Thread B onto Carrier Thread 1.</p><p>Virtual Thread B sends a request to the payment API.</p><p>While waiting for the API response, it can also be unmounted.</p><p><strong>Step 4: Virtual Thread C starts executing.</strong></p><p>Carrier Thread 1 is now available to execute Virtual Thread C.</p><p><strong>Step 5: Database response arrives.</strong></p><p>Virtual Thread A becomes runnable again.</p><p>When a carrier thread becomes available, the scheduler mounts Virtual Thread A and continues execution.</p><p>Notice what happened.</p><p>One carrier thread made progress on multiple requests without remaining blocked for the entire duration of each external operation.</p><p>This is how virtual threads enable high concurrency with relatively few platform threads.</p><h3>5. Java Code Example: Creating Virtual Threads</h3><p>Java 21 provides a simple API for creating virtual threads.</p><pre>try (var executor =<br>        Executors.newVirtualThreadPerTaskExecutor()) {</pre><pre>    for (int i = 0; i &lt; 10_000; i++) {</pre><pre>        executor.submit(() -&gt; {</pre><pre>            System.out.println(&quot;Task started&quot;);</pre><pre>            Thread.sleep(2000);</pre><pre>            System.out.println(&quot;Task completed&quot;);<br>            return null;<br>        });<br>    }<br>}</pre><p>Let’s understand what happens internally.</p><ol><li>The executor creates a new virtual thread for each submitted task.</li><li>Runnable virtual threads are scheduled onto available carrier threads.</li><li>When a virtual thread executes Thread.sleep(2000), it becomes suspended.</li><li>Its carrier thread can be released and reused.</li><li>After the sleep duration expires, the virtual thread becomes runnable again.</li><li>The scheduler mounts it onto an available carrier thread to continue execution.</li></ol><p>The application can therefore manage thousands of concurrent waiting tasks without creating thousands of dedicated operating-system threads.</p><p>However, creating 10,000 virtual threads does not mean that 10,000 tasks are executing on the CPU simultaneously.</p><p>Concurrency and parallelism are different concepts.</p><p>Virtual threads improve concurrency by efficiently handling tasks that frequently wait.</p><h3>6. Why Virtual Threads Are Ideal for I/O-Bound Applications</h3><p>Most enterprise applications spend significant time waiting for external resources.</p><p>Consider a typical microservices architecture:</p><pre>Client Request<br>      |<br>      v<br>Spring Boot Application<br>      |<br>      +----&gt; Database<br>      |<br>      +----&gt; Payment Service<br>      |<br>      +----&gt; Inventory Service<br>      |<br>      +----&gt; Authentication Service</pre><p>Each downstream operation may introduce network latency.</p><p>With traditional platform threads, blocking calls can tie up expensive OS threads throughout these waiting periods.</p><p>With virtual threads, supported blocking operations allow carrier threads to be reused.</p><p>This enables applications to handle more concurrent requests without proportionally increasing the number of platform threads.</p><p>However, virtual threads do not make the database or external services respond faster.</p><p>They improve how efficiently the application handles waiting.</p><p><strong>The primary benefit is scalability and throughput, not automatically lower latency for individual requests.</strong></p><h3>7. Do Virtual Threads Improve CPU-Bound Performance?</h3><p>Not necessarily.</p><p>Consider a computation-heavy task:</p><pre>long result = 0;</pre><pre>for (long i = 0; i &lt; 1_000_000_000L; i++) {<br>    result += i;<br>}</pre><p>This task continuously performs computation.</p><p>It needs CPU time throughout execution.</p><p>Unlike an I/O-bound task, it does not spend significant time waiting for an external resource.</p><p>Using virtual threads does not reduce the computational work required.</p><p>Therefore:</p><p>WorkloadVirtual Thread BenefitDatabase callsHighREST API callsHighNetwork I/OHighBlocking I/O operationsHigh when supportedCPU-intensive calculationsLimitedImage/video processingLimited for CPU-bound stages</p><p>Virtual threads are especially effective when applications need to manage many independent tasks that spend much of their lifetime waiting.</p><h3>8. Important Considerations Before Using Virtual Threads</h3><p>Virtual threads are powerful, but they are not a universal replacement for all concurrency mechanisms.</p><p><strong>Not every blocking operation releases its carrier thread.</strong></p><p>Certain native or foreign-function calls and blocking scenarios can prevent unmounting. Java 24 also introduced changes that significantly reduced virtual-thread pinning related to synchronized methods and blocks.</p><p>Additionally, virtual threads do not eliminate downstream resource limits.</p><p>For example, creating 10,000 virtual threads does not automatically provide 10,000 database connections.</p><p>Your database connection pool, API rate limits, memory capacity, and downstream service throughput still need careful consideration.</p><p>It is also generally unnecessary to pool virtual threads. Virtual threads are intended to be inexpensive enough to create per task.</p><p>If concurrency needs to be restricted, it is often better to control access to the constrained resource using mechanisms such as semaphores or connection pools.</p><h3>9. Virtual Threads vs Platform Threads</h3><p>FeaturePlatform ThreadsVirtual ThreadsManaged primarily byOperating systemJVMResource overheadRelatively highRelatively lowOS thread per taskTypically yesNoBlocking I/OUsually occupies OS threadCan release carrier threadLarge-scale concurrencyMore expensiveMore scalableCPU-bound performanceSuitableNo inherent speed advantageTypical use caseGeneral-purpose executionHigh-concurrency I/O workloads</p><h3>10. Final Thoughts</h3><p>The most interesting part of Java Virtual Threads is not simply that they are lightweight.</p><p>It is how they change the relationship between application tasks and operating-system threads.</p><p>In a traditional thread-per-request model, an application request may occupy a platform thread even when it is waiting for a database or network response.</p><p>With virtual threads, the JVM can suspend a waiting virtual thread, unmount it from its carrier, and allow that carrier to execute other tasks.</p><p>Once the waiting operation completes, the virtual thread becomes runnable and continues execution when a carrier is available.</p><p>This provides a more efficient execution model for applications that handle large numbers of concurrent I/O operations.</p><p><strong>The key takeaway:</strong></p><p>Virtual Threads do not make the CPU faster. They make better use of available platform threads by avoiding unnecessary occupation of those threads during supported blocking operations.</p><p>For Java developers building Spring Boot applications, REST APIs, and microservices, understanding this scheduling mechanism is an important step toward designing highly scalable systems.</p><p><em>Kindly Share your thoughts in the comments.</em></p><p><strong>Tags:</strong> #Java #VirtualThreads #ProjectLoom #Java21 #SpringBoot #Concurrency #Multithreading #SoftwareEngineering</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=402d5884242f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Stateful AI Agents Don’t Scale?]]></title>
            <link>https://medium.com/@hjwasim/why-stateful-ai-agents-dont-scale-e79adc78aaea?source=rss-a63c1052a91c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e79adc78aaea</guid>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Hjwasim]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 01:12:00 GMT</pubDate>
            <atom:updated>2026-07-06T01:12:00.251Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKkcyIZWDvwEBnplszOWNQ.png" /></figure><p>One of the most interesting takeaways from Prasanth Subramaniam’s talk at the MCP Dev Summit was a simple but powerful idea:</p><blockquote>The biggest bottleneck in scaling AI agents isn&#39;t the model—it&#39;s the connection.</blockquote><h3>The Problem</h3><p>Most AI agent systems maintain a stateful connection. When a user starts interacting with an agent, the server keeps the conversation state, intermediate results, and execution context in its own memory.</p><p>This works well for a single server, but problems appear at scale.</p><h3>1. Persistent Connections</h3><p>Protocols like STDIO, SSE, or WebSockets keep a long-lived connection to the same server. Since the session state lives in that server&#39;s memory, every subsequent request must return to the same machine.</p><p>This creates a tight coupling between the user and one server instance.</p><h3>2. Chatty Agent Workflows</h3><p>Modern AI agents don&#39;t make a single request. They repeatedly call tools, execute code, retrieve data, and continue reasoning.</p><p>A single user request may involve dozens of network round trips.</p><p>As traffic grows, these conversations generate significant network and infrastructure overhead.</p><h3>3. The Load Balancer Trap</h3><p>Cloud systems normally distribute requests across multiple servers.</p><p>But if the conversation state exists only in Server A&#39;s RAM, routing the next request to Server B breaks the session because it has no context.</p><p>The common workaround is sticky sessions, which always send the user back to the same server. While this preserves context, it also limits horizontal scaling and reduces resilience if that server fails.</p><h3>The Solution: Stateless Architecture</h3><p>Instead of storing session state inside a server’s memory, move it to shared infrastructure such as <strong>Redis</strong> or a shared database.</p><p>Now every server can retrieve the same conversation state, making servers interchangeable.</p><h3>Key Takeaway</h3><p>The lesson isn&#39;t that state is bad—it&#39;s where the state lives that matters.</p><p>Keeping state inside individual servers creates scaling bottlenecks. Moving state to shared infrastructure allows compute nodes to remain stateless, enabling AI platforms to scale efficiently while preserving user context.</p><p>For production AI systems, the future isn&#39;t stateful servers—it&#39;s stateless compute backed by shared state.</p><p>Thanks for reading. I hope you found this useful!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e79adc78aaea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Does BigQuery Use Columnar Storage?]]></title>
            <link>https://medium.com/@hjwasim/why-does-bigquery-use-columnar-storage-67f00248869a?source=rss-a63c1052a91c------2</link>
            <guid isPermaLink="false">https://medium.com/p/67f00248869a</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[google-big-query]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Hjwasim]]></dc:creator>
            <pubDate>Sun, 14 Jun 2026 14:11:45 GMT</pubDate>
            <atom:updated>2026-06-14T14:12:36.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9pUiTC0_q1pdPVvmevw1eg.png" /><figcaption>Google BigQuery</figcaption></figure><p>when people first learn about Google BigQuery, one of the things they hear is</p><blockquote>“BigQuery stores data in a columnar format”</blockquote><p>But, what does that actually mean, and why does it make BigQuery so fast?</p><h4>Understanding How data is stored</h4><p>Imagine we have an Employee table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*df_A_D7ZIs0YBFZxKLwk2Q.png" /><figcaption>Employee Table</figcaption></figure><p>There are two common ways database can store this data:</p><ol><li>Row-based Storage</li><li>Columnar-based Storage</li></ol><h4>Row-Based Storage</h4><p>Traditional relational databases such as MySQL and Postgres typically store data row by row.</p><p>Each employee’s entire record is stored together. This approach works extremely well for <strong>transactional systems</strong> where <strong>applications frequently insert, update or delete individual records.</strong></p><pre>UPDATE Employee SET Salary = 80000 WHERE ID = 1;</pre><p>Since the entire employee record is stored together, the database can quickly locate and modify it.</p><h4>Column-Based Storage</h4><p>Google BigQuery takes different approach. Instead of storing data row by row, <strong>it stores data column by column.</strong></p><p>Each column is stored seperately. At first glance, this seem strange. It becomes incredibly powerful for analytics.</p><p>BigQuery is not designed for transactional workloads. Instead, it is built specifically for analytical processing and large-scale data analysis.</p><h4>Why Analytics Work Faster with Columnar-Storage?</h4><p>Suppose we want to retrieve only employee salaries.</p><pre>SELECT Salary FROM Employee;</pre><blockquote>What happens in a Row-based Databases?</blockquote><p>The Database reads row-by-row. Even though we only need the Salary column, the database still reads ID, Name, Age, Salary.</p><blockquote>What happens in BigQuery?</blockquote><p>Google BigQuery simply reads only salary column. It ignores the columns that are not required.</p><p>As a result, less data is read from storage so less I/O is required.</p><h4>The Real Power Shows Up with Massive Datasets</h4><p>Imagine a table containing 1 billion rows and 200 columns.</p><p>Now consider the below query.</p><pre>SELECT CustomerID, Revenue FROM Sales;</pre><p>here, only 2 columns are needed. In row-storage database systems may still need to touch data associated with all 200 columns.</p><p>A column-storage system like BigQuery reads only:</p><pre>- CustomerID<br>- Revenue</pre><p>This dramatically reduces the amount of data scanned.</p><p>When dealing with terabytes or petabytes of data, this difference becomes enormous.</p><p>Thanks for reading! I hope this article helped you better understand why BigQuery uses columnar storage and how it achieves such impressive query performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67f00248869a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CPU-bound vs I/O-bound — Explained]]></title>
            <link>https://medium.com/@hjwasim/cpu-bound-vs-i-o-bound-explained-aae9ecc1b723?source=rss-a63c1052a91c------2</link>
            <guid isPermaLink="false">https://medium.com/p/aae9ecc1b723</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[asynchronous-programming]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Hjwasim]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 10:53:37 GMT</pubDate>
            <atom:updated>2025-12-26T10:57:52.395Z</atom:updated>
            <content:encoded><![CDATA[<h3>CPU-bound vs I/O-bound — Explained</h3><p>Hello people, I hope everyone is doing good. In this post, we are going to see what CPU-bound and I/O-bound operations are.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*lDxeD2Q7L8OG2W9yPZPNcA.png" /><figcaption>CPU-bound vs I/O-bound</figcaption></figure><blockquote><strong><em>What do they mean?</em></strong></blockquote><p>They mean what the program is primarily waiting for — file I/O, network requests, or heavy computation.</p><blockquote><strong><em>CPU-bound operations</em></strong></blockquote><p><strong>CPU-bound operations</strong> are tasks where <strong>execution speed depends mainly on the CPU.</strong></p><p>If we made the CPU faster, the task or operation would finish faster, for example increasing the clock speed of the CPU, If more CPU cores are used.</p><pre>def cpu_bound():<br>    total = 0<br>    # Looping through huge collections - it is considered as a CPU-bounded code<br>    for i in range(100_000_000): <br>        total += i<br>    return total</pre><p><strong>Common CPU-bound tasks:</strong></p><ul><li>Simple Fibonacci series calculation or any mathematical calculations</li><li>Looping through huge collections or dictionaries</li><li>Machine Learning Model Training</li></ul><blockquote><strong><em>I/O-bound operations</em></strong></blockquote><p><strong>I/O-bound operations</strong> are tasks where <strong>most of the time is spent waiting</strong> for an external system, not using the CPU (or lessly used).</p><p>External systems such as :</p><ul><li>A <strong>network</strong> (web servers, APIs)</li><li>A <strong>disk</strong> (files, databases)</li><li>Any <strong>input/output device</strong></li></ul><pre>import requests<br><br>def io_bound():<br>    # Making HTTP call (communicating with the external system via network)<br>    # It is considered as a I/O-bounded code.<br>    return requests.get(&quot;https://hjwasim.com&quot;).text</pre><blockquote><strong><em>I/O-bound and CPU-bound operations often exist side by side within the real world program.</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6bW3OZERpwwKNONZcVBVA.png" /><figcaption>Real world python program where CPU-bound and I/O-bound code are exists</figcaption></figure><p>In the above code snippet, we begin with an <strong>I/O-bound operation</strong> by making a network request to download the contents of https://www.example.com. During this step, the program spends most of its time waiting for data to arrive from the remote server (example.com).</p><p>Once the response has been received, we perform a <strong>CPU-bound operation</strong> by iterating over the response headers, applying formatting logic, and combining them into a single string separated by newline characters. This phase actively uses the CPU to process and transform the data.</p><p>Finally, we open a file and write the formatted string to disk, which is another <strong>I/O-bound operation</strong> because it depends on the speed of the file system rather than the CPU.</p><p>This pattern — <strong>I/O → CPU → I/O</strong> — is extremely common in real-world applications.</p><p>Thank you so much for your time. I hope everyone understood the concepts of CPU-bound and IO-bound.</p><p>Instagram — <a href="https://www.instagram.com/hj_wazim/#">https://www.instagram.com/hj_wazim</a></p><p>Github — <a href="https://github.com/hjwasim">https://github.com/hjwasim</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aae9ecc1b723" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment models — Traditional Deployment vs Virtualized Deployment vs Containerized Deployment]]></title>
            <link>https://medium.com/@hjwasim/deployment-models-traditional-deployment-vs-virtualized-deployment-vs-containerized-deployment-fa3af597470a?source=rss-a63c1052a91c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa3af597470a</guid>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Hjwasim]]></dc:creator>
            <pubDate>Thu, 19 Oct 2023 09:38:56 GMT</pubDate>
            <atom:updated>2023-10-19T11:06:15.717Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deployment models — Traditional Deployment vs Virtualized Deployment vs Containerized Deployment</h3><p>Hello peoples, In this story, I’m gonna talk about the various software deployment methods at a high level view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4KpuL-ZD-ypMUhAN" /><figcaption>Photo by <a href="https://unsplash.com/@tvick?utm_source=medium&amp;utm_medium=referral">Taylor Vick</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There are 3 types in a deployment methods.</p><ol><li>Traditional Deployment</li><li>Virtualized Deployment</li><li>Containerized Deployment</li></ol><p><strong>Traditional Deployment:</strong></p><p>Traditionally, On a single server, several applications were deployed and those applications could utilize only one dedicated server.</p><figure><img alt="Traditional deployment model" src="https://cdn-images-1.medium.com/max/520/1*w6GiWONIeEINpxj13D90rg.png" /><figcaption>Traditional software deployment model</figcaption></figure><p>Sadly, this resulted in two problems:</p><ol><li>Most of the time, a single server running a single application was underutilized and it’s resources like power, cooling, storage, and other things were wasted.</li><li>A single server with multiple applications were utilized the resources better but overall performance of the server was utterly slow because applications running in a server had to fight with each other for CPU time, RAM usage, and network bandwidth.</li></ol><p>People had to manage more servers as a result of these problems.</p><p><strong>Virtualized Deployment</strong></p><p>Virtualization based deployment gives many enhancements and improvements in comparison to traditional deployment. we could run multiple VM(virtual machines) on a single server with their own OS.</p><figure><img alt="Virtualized software deployment model" src="https://cdn-images-1.medium.com/max/523/1*XXTh70OOHV5MH73MT2dBxA.png" /><figcaption>Virtualized software deployment model</figcaption></figure><p>It was much faster than traditional deployment. Virtualization improved server utilization and minimized the hardware expenses.</p><p><strong>Containerized Deployment</strong></p><p>Containers are quite comparable to virtual machines (VMs) but there’s some differences between these.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*ocgWP9dWqmBLglLcrbxVmw.png" /><figcaption>Containerized software deployment model</figcaption></figure><ol><li>Containers do not require an entire OS and libraries to run the application (even tiny applications).</li><li>These are lightweight compared to VMs. It could package the single application with its dependencies very efficiently.</li><li>Containers are portable and fast.</li></ol><p>We can deploy and host these containers on cloud in order to run the applications.</p><p>I hope this post will help you to understand the deployment models of application.</p><p>Please share and drop a like. Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa3af597470a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Where can we initialize the final instance variables?]]></title>
            <link>https://medium.com/@hjwasim/where-can-we-initialize-the-final-instance-variables-2192f2753b11?source=rss-a63c1052a91c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2192f2753b11</guid>
            <category><![CDATA[java8]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Hjwasim]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 08:42:21 GMT</pubDate>
            <atom:updated>2023-10-06T08:42:21.187Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello peoples, this is my first technical blog. Today I’m gonna tell about the places where we can initialize the final variables in Java.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U6rsLnFHTumYtArU" /><figcaption>Photo by <a href="https://unsplash.com/@thoughtcatalog?utm_source=medium&amp;utm_medium=referral">Thought Catalog</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So, First and foremost!</p><p><strong>What is final in Java?</strong></p><p>The<strong> final is a Java keyword </strong>used for classes, fields and methods, which makes them non-changeable i.e. <strong>we cannot inherit, reassign or override them.</strong></p><p>So, Here I’m going to speak about the final fields only.</p><h3>Initialize final instance variables:</h3><p>If any instance variables declared as “final”, then we must need to initialize the variable explicitly.</p><p>we can initialize the final instance variables only in 3 places.</p><ol><li>At the time of declaration</li><li>Inside the instance block</li><li>Before constructor execution/completion</li></ol><h4>1. At the time of declaration</h4><pre>class Test {<br>   final Integer x num = 23;<br>}</pre><h4>2. Inside the instance block</h4><pre>class Test {<br>   final Integer x;<br>   {<br>      x = 23;  //Instance block<br>   }<br>}</pre><h4>3. Before constructor execution/completion</h4><pre>class Test {<br>   final Integer x;<br>   public Test(){<br>      x = 23;   //constructor block<br>   }<br>}</pre><p>I hope this post will help you to understand the initialization of final instance variables. Please share and drop a like.</p><p>Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2192f2753b11" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>