<?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>Forem: Miguel Miranda de Mattos</title>
    <description>The latest articles on Forem by Miguel Miranda de Mattos (@mmmattos).</description>
    <link>https://forem.com/mmmattos</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F273281%2F05b3d92e-1825-4e10-8c43-cd53ff9fc03b.png</url>
      <title>Forem: Miguel Miranda de Mattos</title>
      <link>https://forem.com/mmmattos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mmmattos"/>
    <language>en</language>
    <item>
      <title>Concurrency Models in Practice: Node.js vs Go vs Python</title>
      <dc:creator>Miguel Miranda de Mattos</dc:creator>
      <pubDate>Wed, 29 Apr 2026 21:41:13 +0000</pubDate>
      <link>https://forem.com/mmmattos/concurrency-models-in-practicenodejs-vs-go-vs-python-2a3e</link>
      <guid>https://forem.com/mmmattos/concurrency-models-in-practicenodejs-vs-go-vs-python-2a3e</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Ff8nc5buxeo4y790rawsa.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.amazonaws.com%2Fuploads%2Farticles%2Ff8nc5buxeo4y790rawsa.png" alt="Node.js vs Go vs {ython Concurrency" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most systems don’t fail because of syntax — they fail because of how they handle flow.&lt;/p&gt;

&lt;p&gt;At scale, software is no longer just about executing logic. It’s about orchestrating movement: requests, data, and work units flowing through a system under pressure. Different runtimes don’t just process tasks — they shape how work moves. And those choices define whether your system degrades gracefully… or collapses under load.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Pragmatic Guide for Scalable Systems
&lt;/h3&gt;

&lt;p&gt;Most systems don’t fail because of syntax. They fail because of poor decisions around concurrency and scaling.&lt;/p&gt;

&lt;p&gt;If you’re building systems that need to handle real-world load, your runtime choice is not just an implementation detail — — it’s an architectural decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Core Distinction
&lt;/h3&gt;

&lt;p&gt;• Concurrency = handling many tasks&lt;br&gt;
• Parallelism = executing tasks simultaneously&lt;/p&gt;

&lt;p&gt;The real question is: How does your runtime use CPU cores?&lt;/p&gt;

&lt;h3&gt;
  
  
  Comparative Overview
&lt;/h3&gt;

&lt;p&gt;Node.js&lt;br&gt;
• Event loop (non-blocking I/O)&lt;br&gt;
• Scales via processes (cluster)&lt;br&gt;
• 1 process = 1 core&lt;/p&gt;

&lt;p&gt;Go&lt;br&gt;
• Goroutines (lightweight tasks)&lt;br&gt;
• Thousands mapped to few threads&lt;br&gt;
• Efficient multi-core usage&lt;/p&gt;

&lt;p&gt;Python&lt;br&gt;
• Threads, asyncio, multiprocessing&lt;br&gt;
• True parallelism only via processes&lt;br&gt;
• GIL limits threading&lt;/p&gt;

&lt;h4&gt;
  
  
  Node.js — — Process-Level Scaling
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;const cluster = require(‘cluster’);&lt;br&gt;
if (cluster.isPrimary) { &lt;br&gt;
  for (let i = 0; i &amp;lt; require(‘os’).cpus().length; i++) { &lt;br&gt;
    cluster.fork(); &lt;br&gt;
  } &lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
• Scale = replicate processes&lt;br&gt;
• No shared memory&lt;br&gt;
• Strong for I/O, weak for CPU&lt;/p&gt;

&lt;h4&gt;
  
  
  Go — — Concurrency as a Primitive
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;go handleRequest()&lt;/code&gt;&lt;br&gt;
• Massive concurrency with low overhead&lt;br&gt;
• Scheduler handles complexity&lt;br&gt;
• Designed for high-throughput systems&lt;/p&gt;

&lt;h4&gt;
  
  
  Python — — Power with Constraints
&lt;/h4&gt;

&lt;p&gt;Threading&lt;br&gt;
&lt;code&gt;threading.Thread(target=task)&lt;/code&gt;&lt;br&gt;
Multiprocessing&lt;br&gt;
&lt;code&gt;Process(target=task)&lt;/code&gt;&lt;br&gt;
Async&lt;br&gt;
&lt;code&gt;async def task(): …&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Flexible but fragmented model&lt;br&gt;
Requires deliberate architecture&lt;/p&gt;

&lt;h4&gt;
  
  
  Quick Comparison
&lt;/h4&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.amazonaws.com%2Fuploads%2Farticles%2Fx25cpomlrm7j4zcfq2p9.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.amazonaws.com%2Fuploads%2Farticles%2Fx25cpomlrm7j4zcfq2p9.png" alt="Quick Comparison" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Use Case Mapping
&lt;/h4&gt;

&lt;p&gt;• APIs → Node.js or Go&lt;br&gt;
• Streaming systems → Go&lt;br&gt;
• CPU-heavy workloads → Python (multiprocessing)&lt;br&gt;
• Data / ML → Python&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;p&gt;• Node.js: simple, effective, but process-bound&lt;br&gt;
• Go: best-in-class concurrency model&lt;br&gt;
• Python: powerful ecosystem, weaker runtime model&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Perspective
&lt;/h3&gt;

&lt;p&gt;There is no best language — — only trade-offs.&lt;/p&gt;

&lt;p&gt;Senior engineering is about understanding those trade-offs early:&lt;/p&gt;

&lt;p&gt;• Workload type (I/O vs CPU)&lt;br&gt;
• Scaling strategy (cores vs machines)&lt;br&gt;
• Operational complexity&lt;/p&gt;

&lt;p&gt;Modern AI tooling makes it trivial to generate working code.&lt;/p&gt;

&lt;p&gt;But scalable systems are not the result of code generation.&lt;/p&gt;

&lt;p&gt;They are the result of:&lt;br&gt;
• Correct architectural decisions&lt;br&gt;
• Appropriate concurrency models&lt;br&gt;
• Deep understanding of runtime behavior&lt;/p&gt;

&lt;p&gt;Code gets you started.&lt;/p&gt;

&lt;p&gt;Architecture determines whether your system survives production.&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>node</category>
      <category>go</category>
      <category>python</category>
    </item>
  </channel>
</rss>
