<?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: Felipe</title>
    <description>The latest articles on DEV Community by Felipe (@felipeness).</description>
    <link>https://dev.to/felipeness</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%2F1088792%2Fad69e366-3e12-4838-9ccf-c966deab3059.jpeg</url>
      <title>DEV Community: Felipe</title>
      <link>https://dev.to/felipeness</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/felipeness"/>
    <language>en</language>
    <item>
      <title>Holonomic Systems: What Arthur Koestler Can Teach Us About Software Architecture</title>
      <dc:creator>Felipe</dc:creator>
      <pubDate>Thu, 25 Dec 2025 14:39:09 +0000</pubDate>
      <link>https://dev.to/felipeness/holonomic-systems-what-arthur-koestler-can-teach-us-about-software-architecture-29hf</link>
      <guid>https://dev.to/felipeness/holonomic-systems-what-arthur-koestler-can-teach-us-about-software-architecture-29hf</guid>
      <description>&lt;h2&gt;
  
  
  The Dilemma Every Architect Faces
&lt;/h2&gt;

&lt;p&gt;How do we build systems that are &lt;strong&gt;cohesive&lt;/strong&gt; enough to be understandable and &lt;strong&gt;decoupled&lt;/strong&gt; enough to evolve independently?&lt;/p&gt;

&lt;p&gt;On one side: the &lt;strong&gt;monolith&lt;/strong&gt; — initial simplicity that becomes a nightmare.&lt;br&gt;
On the other: &lt;strong&gt;microservices&lt;/strong&gt; — flexibility that can become operational complexity.&lt;/p&gt;

&lt;p&gt;What if there was a mental framework that balanced these forces? There is. And it comes from an unexpected place: a 1967 philosophy book.&lt;/p&gt;


&lt;h2&gt;
  
  
  Arthur Koestler and the Concept of Holon
&lt;/h2&gt;

&lt;p&gt;In 1967, Hungarian-British philosopher &lt;strong&gt;Arthur Koestler&lt;/strong&gt; published &lt;em&gt;"The Ghost in the Machine"&lt;/em&gt;. Frustrated with simplistic dichotomies, he coined a new term: &lt;strong&gt;holon&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Etymology
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;holos&lt;/strong&gt; (Greek): "whole", "entire"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;suffix -on&lt;/strong&gt;: connotes "particle" (like proton, neutron)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Holon = an entity that is simultaneously a complete WHOLE and a PART of something larger.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The Fundamental Duality
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Every holon has two tendencies: an integrative tendency to function as part of a larger whole, and a self-assertive tendency to preserve its individual autonomy."&lt;/em&gt;&lt;br&gt;
— Arthur Koestler&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Koestler called this the &lt;strong&gt;"Janus effect"&lt;/strong&gt; — like the Roman god with two faces. Every holon looks simultaneously inward (its integrity) and outward (the larger system).&lt;/p&gt;


&lt;h2&gt;
  
  
  Holons in Nature
&lt;/h2&gt;

&lt;p&gt;Your body is a perfect holarchy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ORGANISM
    └── ORGAN (heart)
          └── TISSUE (cardiac muscle)
                └── CELL
                      └── ORGANELLE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each level is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous&lt;/strong&gt;: functions on its own&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrated&lt;/strong&gt;: contributes to the whole&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When this balance breaks? &lt;strong&gt;Cancer&lt;/strong&gt; — cells that maintain autonomy but lose integration.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem with Traditional Architectures
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Poorly Structured Monolith
&lt;/h3&gt;

&lt;p&gt;Components are just &lt;strong&gt;parts&lt;/strong&gt; — no real autonomy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can't test in isolation&lt;/li&gt;
&lt;li&gt;Can't deploy independently&lt;/li&gt;
&lt;li&gt;Failure propagates everywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Suppressed the self-assertive tendency.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Poorly Implemented Microservices
&lt;/h3&gt;

&lt;p&gt;Dozens of services with synchronous HTTP forming a "distributed monolith":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chained synchronous calls&lt;/li&gt;
&lt;li&gt;One failure brings down all&lt;/li&gt;
&lt;li&gt;Complexity without benefit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Nominal autonomy, chaotic integration.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Self-Contained Systems: Holonomy in Practice
&lt;/h2&gt;

&lt;p&gt;German company &lt;strong&gt;INNOQ&lt;/strong&gt; formalized the concept of &lt;strong&gt;Self-Contained Systems (SCS)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Characteristics
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Principle&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Autonomous&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Complete web application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vertical Slice&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;UI + logic + own data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;No sync in request/response&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Doesn't call other SCS synchronously&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Single team&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One team per SCS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The Golden Rule
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Other SCS should not be accessed synchronously within the request/response cycle.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you need data from another SCS → have a &lt;strong&gt;local copy&lt;/strong&gt; updated via events.&lt;/p&gt;




&lt;h2&gt;
  
  
  SCS vs Microservices: An Honest Comparison
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is NOT a difference
&lt;/h3&gt;

&lt;p&gt;❌ "SCS uses async, microservices uses sync"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong.&lt;/strong&gt; Modern microservices use Kafka, RabbitMQ, event-driven architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  The real differences
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;SCS&lt;/th&gt;
&lt;th&gt;Microservices&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Quantity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5-25&lt;/td&gt;
&lt;td&gt;50-500+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mandatory&lt;/td&gt;
&lt;td&gt;Optional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Granularity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Business domain&lt;/td&gt;
&lt;td&gt;More granular&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sync in request&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Prohibited&lt;/td&gt;
&lt;td&gt;Allowed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Anatomy of a Software Holon
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│              HOLON: Orders                  │
├─────────────────────────────────────────────┤
│  PUBLIC INTERFACE                           │
│  • REST/GraphQL API                         │
│  • Published events (Kafka)                 │
│  • Consumed events                          │
├─────────────────────────────────────────────┤
│  DOMAIN LOGIC                               │
│  • Business rules                           │
│  • Workflows/Sagas                          │
├─────────────────────────────────────────────┤
│  PERSISTENCE                                │
│  • Own database                             │
│  • Replicas of external data                │
├─────────────────────────────────────────────┤
│  SELF-REGULATION                            │
│  • Health checks                            │
│  • Circuit breakers                         │
│  • Metrics                                  │
└─────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Dependency Rule
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ WRONG&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;InventoryService&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../inventory&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ CORRECT&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;eventBus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;OrderCreated&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;order&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Holons don't import other holons directly.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenges of Asynchronous Communication
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Event Ordering
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sent: [A, B, C]
Received: [A, C, B] 😱
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Kafka guarantees order per partition.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Duplication (at-least-once)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;alreadyProcessed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;markAsProcessed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Eventual Consistency
&lt;/h3&gt;

&lt;p&gt;Accept it as reality. UI shows "processing..." when needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Distributed Debugging
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Correlation ID&lt;/strong&gt; in all logs + Jaeger/Zipkin.&lt;/p&gt;




&lt;h2&gt;
  
  
  When to Use (and When Not)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Use when:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Multiple distinct domains&lt;/li&gt;
&lt;li&gt;Teams need independence&lt;/li&gt;
&lt;li&gt;High availability is critical&lt;/li&gt;
&lt;li&gt;Differentiated scale per domain&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ❌ Avoid when:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Small system, single team&lt;/li&gt;
&lt;li&gt;MVP or proof of concept&lt;/li&gt;
&lt;li&gt;Strong consistency is required&lt;/li&gt;
&lt;li&gt;No experience with distributed systems&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Evolution Path
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Modular Monolith
       ↓
Separate schemas
       ↓
Introduce messaging
       ↓
Complete Holonomic System
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Evolve when the pain justifies it, not before.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Holonomy isn't a silver bullet. It's a &lt;strong&gt;mental framework&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What Koestler taught us: resilient systems maintain balance between being a &lt;strong&gt;whole&lt;/strong&gt; and being a &lt;strong&gt;part&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Monoliths, microservices, SCS — all can work. Wisdom lies in choosing right for the context.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Koestler, Arthur. &lt;em&gt;"The Ghost in the Machine"&lt;/em&gt; (1967)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://scs-architecture.org/" rel="noopener noreferrer"&gt;SCS Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://microservices.io/patterns/data/saga.html" rel="noopener noreferrer"&gt;Microservices.io - Saga Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kafka.apache.org/" rel="noopener noreferrer"&gt;Apache Kafka&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;"The whole is more than the sum of its parts, but the parts are more than fragments of the whole."&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Liked it?&lt;/strong&gt; Leave a ❤️ and share with anyone facing architecture decisions!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want to discuss?&lt;/strong&gt; Comment below 👇&lt;/p&gt;

</description>
      <category>programming</category>
      <category>distributedsystems</category>
      <category>softwareengineering</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Sistemas Holonômicos: O Que Arthur Koestler Pode Ensinar Sobre Arquitetura de Software</title>
      <dc:creator>Felipe</dc:creator>
      <pubDate>Thu, 25 Dec 2025 14:37:48 +0000</pubDate>
      <link>https://dev.to/felipeness/sistemas-holonomicos-o-que-arthur-koestler-pode-ensinar-sobre-arquitetura-de-software-3hfl</link>
      <guid>https://dev.to/felipeness/sistemas-holonomicos-o-que-arthur-koestler-pode-ensinar-sobre-arquitetura-de-software-3hfl</guid>
      <description>&lt;h2&gt;
  
  
  O Dilema que Todo Arquiteto Enfrenta
&lt;/h2&gt;

&lt;p&gt;Como construir sistemas que sejam &lt;strong&gt;coesos&lt;/strong&gt; o suficiente para serem compreensíveis e &lt;strong&gt;desacoplados&lt;/strong&gt; o suficiente para evoluírem independentemente?&lt;/p&gt;

&lt;p&gt;De um lado: o &lt;strong&gt;monolito&lt;/strong&gt; — simplicidade inicial que vira pesadelo.&lt;br&gt;
Do outro: &lt;strong&gt;microservices&lt;/strong&gt; — flexibilidade que pode virar complexidade operacional.&lt;/p&gt;

&lt;p&gt;E se existisse um framework mental que equilibrasse essas forças? Existe. E vem de um lugar inesperado: um livro de filosofia de 1967.&lt;/p&gt;


&lt;h2&gt;
  
  
  Arthur Koestler e o Conceito de Holon
&lt;/h2&gt;

&lt;p&gt;Em 1967, o filósofo húngaro-britânico &lt;strong&gt;Arthur Koestler&lt;/strong&gt; publicou &lt;em&gt;"The Ghost in the Machine"&lt;/em&gt;. Frustrado com dicotomias simplistas, ele criou um termo novo: &lt;strong&gt;holon&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Etimologia
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;holos&lt;/strong&gt; (grego): "todo", "inteiro"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sufixo -on&lt;/strong&gt;: conota "partícula" (como próton, nêutron)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Holon = uma entidade que é simultaneamente um TODO completo e uma PARTE de algo maior.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  A Dualidade Fundamental
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Cada holon tem duas tendências: uma tendência integrativa de funcionar como parte de um todo maior, e uma tendência auto-afirmativa de preservar sua autonomia individual."&lt;/em&gt;&lt;br&gt;
— Arthur Koestler&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Koestler chamou isso de &lt;strong&gt;"efeito Janus"&lt;/strong&gt; — como o deus romano de duas faces. Todo holon olha simultaneamente para dentro (sua integridade) e para fora (o sistema maior).&lt;/p&gt;


&lt;h2&gt;
  
  
  Holons na Natureza
&lt;/h2&gt;

&lt;p&gt;Seu corpo é uma holarquia perfeita:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ORGANISMO
    └── ÓRGÃO (coração)
          └── TECIDO (músculo cardíaco)
                └── CÉLULA
                      └── ORGANELA
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cada nível é:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autônomo&lt;/strong&gt;: funciona por si&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrado&lt;/strong&gt;: contribui para o todo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Quando esse equilíbrio quebra? &lt;strong&gt;Câncer&lt;/strong&gt; — células que mantêm autonomia mas perdem integração.&lt;/p&gt;




&lt;h2&gt;
  
  
  O Problema das Arquiteturas Tradicionais
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Monolito Mal Estruturado
&lt;/h3&gt;

&lt;p&gt;Componentes são apenas &lt;strong&gt;partes&lt;/strong&gt; — sem autonomia real:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Não testam isoladamente&lt;/li&gt;
&lt;li&gt;Não deployam independentemente&lt;/li&gt;
&lt;li&gt;Falha propaga para tudo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Suprimiu a tendência auto-afirmativa.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Microservices Mal Implementados
&lt;/h3&gt;

&lt;p&gt;Dezenas de serviços com HTTP síncrono formando um "distributed monolith":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chamadas síncronas em cadeia&lt;/li&gt;
&lt;li&gt;Falha de um derruba todos&lt;/li&gt;
&lt;li&gt;Complexidade sem benefício&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Autonomia nominal, integração caótica.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Self-Contained Systems: Holonomia na Prática
&lt;/h2&gt;

&lt;p&gt;A empresa alemã &lt;strong&gt;INNOQ&lt;/strong&gt; formalizou o conceito de &lt;strong&gt;Self-Contained Systems (SCS)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Características
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Princípio&lt;/th&gt;
&lt;th&gt;Descrição&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Autônomo&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Aplicação web completa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vertical Slice&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;UI + lógica + dados próprios&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sem sync no request/response&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Não chama outros SCS sincronamente&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Equipe única&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Um time por SCS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  A Regra de Ouro
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Outros SCS não devem ser acessados sincronamente dentro do ciclo request/response.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Se precisa de dados de outro SCS → tem uma &lt;strong&gt;cópia local&lt;/strong&gt; atualizada por eventos.&lt;/p&gt;




&lt;h2&gt;
  
  
  SCS vs Microservices: Comparação Honesta
&lt;/h2&gt;

&lt;h3&gt;
  
  
  O que NÃO é diferença
&lt;/h3&gt;

&lt;p&gt;❌ "SCS usa async, microservices usa sync"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Errado.&lt;/strong&gt; Microservices modernos usam Kafka, RabbitMQ, event-driven architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  As diferenças reais
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspecto&lt;/th&gt;
&lt;th&gt;SCS&lt;/th&gt;
&lt;th&gt;Microservices&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Quantidade&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5-25&lt;/td&gt;
&lt;td&gt;50-500+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Obrigatória&lt;/td&gt;
&lt;td&gt;Opcional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Granularidade&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Domínio de negócio&lt;/td&gt;
&lt;td&gt;Mais granular&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sync no request&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Proibido&lt;/td&gt;
&lt;td&gt;Permitido&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Anatomia de um Holon de Software
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────┐
│              HOLON: Pedidos                 │
├─────────────────────────────────────────────┤
│  INTERFACE PÚBLICA                          │
│  • API REST/GraphQL                         │
│  • Eventos publicados (Kafka)               │
│  • Eventos consumidos                       │
├─────────────────────────────────────────────┤
│  LÓGICA DE DOMÍNIO                          │
│  • Regras de negócio                        │
│  • Workflows/Sagas                          │
├─────────────────────────────────────────────┤
│  PERSISTÊNCIA                               │
│  • Banco próprio                            │
│  • Réplicas de dados externos               │
├─────────────────────────────────────────────┤
│  AUTO-REGULAÇÃO                             │
│  • Health checks                            │
│  • Circuit breakers                         │
│  • Métricas                                 │
└─────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  A Regra de Dependência
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ ERRADO&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;EstoqueService&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../estoque&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ CORRETO&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;eventBus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PedidoCriado&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;pedido&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Holons não importam outros holons diretamente.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Desafios da Comunicação Assíncrona
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Ordenação de Eventos
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enviado: [A, B, C]
Recebido: [A, C, B] 😱
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Solução:&lt;/strong&gt; Kafka garante ordem por partição.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Duplicação (at-least-once)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;jaProcessado&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evento&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;processar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evento&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;marcarProcessado&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;evento&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Eventual Consistency
&lt;/h3&gt;

&lt;p&gt;Aceite como realidade. UI mostra "processando..." quando necessário.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Debugging Distribuído
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Correlation ID&lt;/strong&gt; em todos os logs + Jaeger/Zipkin.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quando Usar (e Quando Não)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ Use quando:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Múltiplos domínios distintos&lt;/li&gt;
&lt;li&gt;Times precisam de independência&lt;/li&gt;
&lt;li&gt;Alta disponibilidade é crítica&lt;/li&gt;
&lt;li&gt;Escala diferenciada por domínio&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ❌ Evite quando:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Sistema pequeno, equipe única&lt;/li&gt;
&lt;li&gt;MVP ou prova de conceito&lt;/li&gt;
&lt;li&gt;Consistência forte é requisito&lt;/li&gt;
&lt;li&gt;Sem experiência em sistemas distribuídos&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Caminho de Evolução
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Monolito Modular
       ↓
Schemas separados
       ↓
Introduzir mensageria
       ↓
Sistema Holonômico Completo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Evolua quando a dor justificar, não antes.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusão
&lt;/h2&gt;

&lt;p&gt;Holonomia não é bala de prata. É um &lt;strong&gt;framework mental&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;O que Koestler nos ensinou: sistemas resilientes mantêm equilíbrio entre ser &lt;strong&gt;todo&lt;/strong&gt; e ser &lt;strong&gt;parte&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Monolitos, microservices, SCS — todos podem funcionar. A sabedoria está em escolher certo para o contexto.&lt;/p&gt;




&lt;h2&gt;
  
  
  Referências
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Koestler, Arthur. &lt;em&gt;"The Ghost in the Machine"&lt;/em&gt; (1967)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://scs-architecture.org/" rel="noopener noreferrer"&gt;SCS Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://microservices.io/patterns/data/saga.html" rel="noopener noreferrer"&gt;Microservices.io - Saga Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kafka.apache.org/" rel="noopener noreferrer"&gt;Apache Kafka&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;"O todo é mais do que a soma das partes, mas as partes são mais do que fragmentos do todo."&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Gostou?&lt;/strong&gt; Deixe um ❤️ e compartilhe com quem está enfrentando decisões de arquitetura!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quer discutir?&lt;/strong&gt; Comenta aí embaixo 👇&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>programming</category>
      <category>distributedsystems</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
