<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yuvaraj Yuvaraj</title>
    <description>The latest articles on DEV Community by Yuvaraj Yuvaraj (@yuvaraj_yuvaraj_a18517569).</description>
    <link>https://dev.to/yuvaraj_yuvaraj_a18517569</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1834802%2F934c1eae-2c07-4c3a-b436-6e5787efeee4.png</url>
      <title>DEV Community: Yuvaraj Yuvaraj</title>
      <link>https://dev.to/yuvaraj_yuvaraj_a18517569</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yuvaraj_yuvaraj_a18517569"/>
    <language>en</language>
    <item>
      <title>Chapter 2: Comparing Node.js, Java and C-sharp</title>
      <dc:creator>Yuvaraj Yuvaraj</dc:creator>
      <pubDate>Sun, 02 Aug 2026 19:03:26 +0000</pubDate>
      <link>https://dev.to/yuvaraj_yuvaraj_a18517569/chapter-2-comparing-nodejs-java-and-c-sharp-17l6</link>
      <guid>https://dev.to/yuvaraj_yuvaraj_a18517569/chapter-2-comparing-nodejs-java-and-c-sharp-17l6</guid>
      <description>&lt;p&gt;JavaScript is a synchronous, single-threaded language.&lt;/p&gt;

&lt;p&gt;That means only one piece of JavaScript code can execute at a time.&lt;/p&gt;

&lt;p&gt;When I first learned this, I thought,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Wait... if JavaScript can only execute one task at a time, then how is Node.js capable of handling thousands of requests?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That question stayed in my mind for quite a while.&lt;/p&gt;

&lt;p&gt;So I started digging deeper.&lt;/p&gt;

&lt;p&gt;Before we continue, forget about the image below for a moment. I simply want to explain what was going on in my head.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh8qgi2pl78wl0hvhif9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh8qgi2pl78wl0hvhif9m.png" alt=" " width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From everything I had learned so far, my understanding was this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript executes only one task at a time.&lt;/li&gt;
&lt;li&gt;File operations, database queries, and network requests take time.&lt;/li&gt;
&lt;li&gt;Yet Node.js somehow doesn't stop while waiting for those operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That immediately raised another question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is actually doing all this work?
&lt;/h2&gt;

&lt;p&gt;If JavaScript can execute only one piece of code at a time, who is reading files from disk? Who is talking to the database? Who is sending HTTP requests?&lt;/p&gt;

&lt;p&gt;I later discovered that operations such as file system access, DNS lookups, cryptographic operations, compression, and several other long-running tasks are &lt;strong&gt;delegated by Node.js to its underlying runtime&lt;/strong&gt; instead of forcing the JavaScript thread to wait.&lt;/p&gt;

&lt;p&gt;At this stage, I wasn't trying to understand &lt;strong&gt;libuv&lt;/strong&gt;, the &lt;strong&gt;Event Loop&lt;/strong&gt;, or the &lt;strong&gt;Thread Pool&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I simply wanted to understand why Node.js behaved so differently from the backend technologies I had heard about before.&lt;/p&gt;

&lt;p&gt;Then I came across another term that almost every Node.js article mentioned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-blocking I/O
&lt;/h2&gt;

&lt;p&gt;Initially, I didn't understand why people considered it such a revolutionary idea.&lt;/p&gt;

&lt;p&gt;So instead of memorizing the definition, I compared it with what I already knew about traditional server applications.&lt;/p&gt;

&lt;p&gt;Let's use a simple database query as an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmdcjydnuifpvuwg14x48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmdcjydnuifpvuwg14x48.png" alt=" " width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine a request arrives and your application needs to fetch some data from a database.&lt;/p&gt;

&lt;p&gt;The database might take &lt;strong&gt;100 milliseconds&lt;/strong&gt;, &lt;strong&gt;500 milliseconds&lt;/strong&gt;, or even a few seconds to respond depending on the workload.&lt;/p&gt;

&lt;p&gt;Now think about what your application does during that waiting period.&lt;/p&gt;

&lt;h2&gt;
  
  
  How traditional servers handled this
&lt;/h2&gt;

&lt;p&gt;Historically, many backend servers—including Java applications before the widespread adoption of asynchronous programming—typically used a &lt;strong&gt;thread-per-request&lt;/strong&gt; model.&lt;/p&gt;

&lt;p&gt;When a request arrived:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A thread was assigned to that request.&lt;/li&gt;
&lt;li&gt;The thread executed your application code.&lt;/li&gt;
&lt;li&gt;When it reached a database query, the thread waited until the database returned the result.&lt;/li&gt;
&lt;li&gt;Only after receiving the response could the thread continue executing the remaining code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The important thing to notice is that &lt;strong&gt;the thread remained occupied while waiting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It wasn't performing useful work.&lt;/p&gt;

&lt;p&gt;It simply stayed blocked until the I/O operation completed.&lt;/p&gt;

&lt;p&gt;If thousands of requests arrived simultaneously, the server required thousands of threads—or the requests had to wait until a thread became available.&lt;/p&gt;

&lt;p&gt;Creating and managing many operating system threads consumes memory, increases context switching, and eventually limits scalability.&lt;/p&gt;

&lt;p&gt;This was perfectly acceptable for many workloads, but it introduced overhead as traffic increased.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Node.js approaches the same problem
&lt;/h2&gt;

&lt;p&gt;Node.js takes a very different approach.&lt;/p&gt;

&lt;p&gt;When JavaScript reaches an operation that involves waiting—such as reading a file, querying a database through asynchronous APIs, performing a DNS lookup, or making a network request—it &lt;strong&gt;doesn't keep the JavaScript thread idle&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead, Node.js delegates the waiting operation to the underlying operating system or to its runtime components.&lt;/p&gt;

&lt;p&gt;The JavaScript thread becomes free almost immediately.&lt;/p&gt;

&lt;p&gt;Instead of waiting, it starts processing the next request that has already arrived.&lt;/p&gt;

&lt;p&gt;Later, when the database finishes its work, Node.js is notified.&lt;/p&gt;

&lt;p&gt;Only then does JavaScript continue executing the callback, Promise, or &lt;code&gt;async/await&lt;/code&gt; continuation associated with that operation.&lt;/p&gt;

&lt;p&gt;This is the core idea behind &lt;strong&gt;non-blocking I/O&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The JavaScript thread spends far less time waiting and far more time executing actual application logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this became a huge advantage
&lt;/h2&gt;

&lt;p&gt;This was the moment everything finally clicked for me.&lt;/p&gt;

&lt;p&gt;The biggest advantage isn't that databases suddenly became faster.&lt;/p&gt;

&lt;p&gt;The database still takes exactly the same amount of time.&lt;/p&gt;

&lt;p&gt;The real advantage is that &lt;strong&gt;Node.js refuses to waste the JavaScript thread while waiting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of sitting idle for hundreds of milliseconds, the same thread can start handling other incoming requests.&lt;/p&gt;

&lt;p&gt;Imagine a restaurant.&lt;/p&gt;

&lt;p&gt;A waiter doesn't stand beside one table waiting for the chef to finish cooking.&lt;/p&gt;

&lt;p&gt;The waiter takes the order, gives it to the kitchen, and immediately serves other customers.&lt;/p&gt;

&lt;p&gt;When the food is ready, the kitchen notifies the waiter, who then delivers the meal.&lt;/p&gt;

&lt;p&gt;Node.js works in a very similar way.&lt;/p&gt;

&lt;p&gt;While one operation is waiting for I/O, JavaScript is already busy serving other requests.&lt;/p&gt;

&lt;p&gt;This allows a relatively small number of resources to serve a surprisingly large number of concurrent connections.&lt;/p&gt;

&lt;p&gt;For companies building APIs, chat applications, streaming services, dashboards, or real-time systems, this can significantly improve resource utilization.&lt;/p&gt;

&lt;p&gt;Instead of having hundreds of threads sitting idle waiting for databases or files, Node.js keeps its JavaScript execution focused on doing useful work.&lt;/p&gt;

&lt;h2&gt;
  
  
  But does that mean traditional platforms are outdated?
&lt;/h2&gt;

&lt;p&gt;Not at all.&lt;/p&gt;

&lt;p&gt;This is an important point that is often misunderstood.&lt;/p&gt;

&lt;p&gt;When Node.js was introduced by &lt;strong&gt;Ryan Dahl&lt;/strong&gt; in &lt;strong&gt;2009&lt;/strong&gt;, its event-driven, non-blocking architecture was a refreshing alternative to the dominant server models of that time.&lt;/p&gt;

&lt;p&gt;However, backend platforms have evolved tremendously over the years.&lt;/p&gt;

&lt;p&gt;Modern Java and C# are very different from what they were fifteen years ago.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern C# and asynchronous programming
&lt;/h2&gt;

&lt;p&gt;Today, C# provides excellent asynchronous programming through &lt;code&gt;async&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When an asynchronous operation reaches an I/O boundary, the executing thread is &lt;strong&gt;returned to the .NET Thread Pool&lt;/strong&gt; instead of remaining blocked.&lt;/p&gt;

&lt;p&gt;That thread is then free to execute other requests.&lt;/p&gt;

&lt;p&gt;When the I/O operation finishes, another available thread resumes the remaining execution.&lt;/p&gt;

&lt;p&gt;This means modern C# applications also avoid wasting threads while waiting for I/O.&lt;/p&gt;

&lt;p&gt;The programming model is different from Node.js, but the objective is remarkably similar:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't keep valuable threads idle during slow I/O operations.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern Java and Virtual Threads
&lt;/h2&gt;

&lt;p&gt;Java has also made major advancements.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Project Loom&lt;/strong&gt;, officially introduced in &lt;strong&gt;Java 21 (2023)&lt;/strong&gt;, Java now supports &lt;strong&gt;Virtual Threads&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Traditional operating system threads are relatively expensive.&lt;/p&gt;

&lt;p&gt;Virtual Threads are much lighter.&lt;/p&gt;

&lt;p&gt;When a Virtual Thread performs a blocking I/O operation, the Java runtime can suspend that Virtual Thread, release the underlying platform thread, and allow it to execute other work.&lt;/p&gt;

&lt;p&gt;Once the database responds, the suspended Virtual Thread resumes execution.&lt;/p&gt;

&lt;p&gt;To the developer, the code still looks simple and sequential, but underneath, the runtime efficiently manages thread usage.&lt;/p&gt;

&lt;p&gt;This dramatically improves scalability while preserving Java's familiar programming style.&lt;/p&gt;

&lt;h2&gt;
  
  
  So why do developers still choose Node.js?
&lt;/h2&gt;

&lt;p&gt;After learning all of this, I realized something important.&lt;/p&gt;

&lt;p&gt;Choosing Node.js isn't about saying it's "better" than Java or C#.&lt;/p&gt;

&lt;p&gt;It's about understanding &lt;strong&gt;the trade-offs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Node.js embraces an event-driven architecture built around a single JavaScript thread for application code.&lt;/p&gt;

&lt;p&gt;It excels at workloads with heavy I/O, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Real-time applications&lt;/li&gt;
&lt;li&gt;Chat systems&lt;/li&gt;
&lt;li&gt;Streaming services&lt;/li&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;li&gt;Microservices&lt;/li&gt;
&lt;li&gt;API gateways&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Java and C#, on the other hand, have evolved to solve many of the historical scalability problems through asynchronous programming, efficient thread pools, and lightweight Virtual Threads.&lt;/p&gt;

&lt;p&gt;Today, all three platforms are capable of building highly scalable backend systems.&lt;/p&gt;

&lt;p&gt;The difference lies more in their runtime architecture, ecosystem, programming model, and the types of workloads they optimize for.&lt;/p&gt;

&lt;h2&gt;
  
  
  My biggest takeaway
&lt;/h2&gt;

&lt;p&gt;Initially, I thought Node.js was magical.&lt;/p&gt;

&lt;p&gt;I assumed it could somehow make databases respond faster or execute multiple JavaScript statements simultaneously.&lt;/p&gt;

&lt;p&gt;Neither of those assumptions is true.&lt;/p&gt;

&lt;p&gt;The database is still slow when it's slow.&lt;/p&gt;

&lt;p&gt;JavaScript is still single-threaded.&lt;/p&gt;

&lt;p&gt;The real innovation is much simpler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Node.js doesn't waste its JavaScript thread waiting.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead, it delegates long-running I/O work to the underlying runtime, continues serving other requests, and comes back only when the operation is complete.&lt;/p&gt;

&lt;p&gt;Understanding that one idea completely changed how I viewed backend systems.&lt;/p&gt;

&lt;p&gt;It also helped me appreciate that modern Java, C#, and Node.js are all solving the same scalability challenge—keeping expensive computing resources busy instead of letting them sit idle.&lt;/p&gt;

&lt;p&gt;Once I understood that, the architecture of Node.js finally started to make sense.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Chapter 1: Introduction to Node - But understanding what system is capable off</title>
      <dc:creator>Yuvaraj Yuvaraj</dc:creator>
      <pubDate>Fri, 31 Jul 2026 20:25:49 +0000</pubDate>
      <link>https://dev.to/yuvaraj_yuvaraj_a18517569/chapter-1-introduction-to-node-but-understanding-what-system-is-capable-off-5cn0</link>
      <guid>https://dev.to/yuvaraj_yuvaraj_a18517569/chapter-1-introduction-to-node-but-understanding-what-system-is-capable-off-5cn0</guid>
      <description>&lt;p&gt;Hi everyone! 👋&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2dc3sbkhnyuh5x28pd16.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2dc3sbkhnyuh5x28pd16.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my very first post on &lt;strong&gt;dev.to&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I'm &lt;strong&gt;Yuvaraj&lt;/strong&gt;, and I've been writing technical blogs on Medium for a while. I recently decided to start publishing here as well because I love learning in public, and I believe dev.to is the perfect community for that.&lt;/p&gt;

&lt;p&gt;I won't claim to be an expert in Node.js. I'd say I'm somewhere in the middle of my journey—comfortable enough to build applications, but still curious enough to question everything happening under the hood.&lt;/p&gt;

&lt;p&gt;So, I'm starting a new series where we'll explore Node.js from the ground up—not just &lt;em&gt;how&lt;/em&gt; to use it, but &lt;em&gt;why&lt;/em&gt; it works the way it does.&lt;/p&gt;

&lt;p&gt;Hopefully, we'll both learn something along the way.&lt;/p&gt;

&lt;p&gt;Wish me luck! 🍀&lt;/p&gt;




&lt;h2&gt;
  
  
  The Question That Changed My Perspective
&lt;/h2&gt;

&lt;p&gt;It all started while I was learning Express.js, building APIs, and trying to understand JavaScript's Event Loop and callbacks.&lt;/p&gt;

&lt;p&gt;Coming from frontend development, I already understood how JavaScript executes inside Chrome. Naturally, I assumed Node.js worked in almost the same way.&lt;/p&gt;

&lt;p&gt;Then I came across something called &lt;strong&gt;worker threads&lt;/strong&gt; and learned that operations like file system tasks don't always behave the way I imagined.&lt;/p&gt;

&lt;p&gt;That completely changed my perspective.&lt;/p&gt;

&lt;p&gt;I realized I had been using Node.js without truly understanding what was happening underneath.&lt;/p&gt;




&lt;h2&gt;
  
  
  My First Question: What Is a Thread?
&lt;/h2&gt;

&lt;p&gt;Before trying to understand Node.js, I wanted to answer a much simpler question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What exactly is a thread?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A simple way to think about it is this:&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;thread&lt;/strong&gt; is a unit of execution. Whenever a program has work to do, that work is performed by a thread.&lt;/p&gt;

&lt;p&gt;That immediately led me to another question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;How do threads actually run inside a computer?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To answer that, I had to go back to the basics of computer hardware.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding the Computer First
&lt;/h2&gt;

&lt;p&gt;Every computer (or even your smartphone) has three important components:&lt;/p&gt;

&lt;h3&gt;
  
  
  RAM
&lt;/h3&gt;

&lt;p&gt;RAM is the computer's &lt;strong&gt;working memory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It temporarily stores the data and program instructions that are actively being used.&lt;/p&gt;

&lt;p&gt;You can think of it as the workspace where running programs keep the information they currently need.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It isn't technically "holding threads." Instead, it stores the memory that running processes and their threads use while executing.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Storage (SSD/HDD)
&lt;/h3&gt;

&lt;p&gt;This is where your files live permanently.&lt;/p&gt;

&lt;p&gt;Your source code, images, videos, applications, and operating system are all stored here until they're needed.&lt;/p&gt;

&lt;p&gt;When you launch a program, the operating system loads the required parts from storage into RAM.&lt;/p&gt;




&lt;h3&gt;
  
  
  CPU
&lt;/h3&gt;

&lt;p&gt;This is where the actual execution happens.&lt;/p&gt;

&lt;p&gt;The CPU executes instructions.&lt;/p&gt;

&lt;p&gt;Modern CPUs contain multiple &lt;strong&gt;cores&lt;/strong&gt;, and each core can execute one or more threads simultaneously (depending on the processor and technologies such as Hyper-Threading or SMT).&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A dual-core CPU can execute multiple threads concurrently.&lt;/li&gt;
&lt;li&gt;A quad-core CPU can execute even more work in parallel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was a huge &lt;strong&gt;"Aha!"&lt;/strong&gt; moment for me.&lt;/p&gt;




&lt;h2&gt;
  
  
  Then My Curiosity Exploded...
&lt;/h2&gt;

&lt;p&gt;Once I understood this much, my mind was full of questions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why node js became popuple, how is it different from java, c#.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those questions pulled me deeper into understanding operating systems, threads, CPU scheduling, and eventually the internal architecture of Node.js.&lt;/p&gt;

&lt;p&gt;If you're curious about exploreation, I think you'll enjoy this journey.&lt;/p&gt;

&lt;p&gt;See you in the next post! 👋&lt;/p&gt;

</description>
      <category>backend</category>
      <category>fullstack</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
