<?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: Tiago Ribeiro Navarro de Andrade</title>
    <description>The latest articles on DEV Community by Tiago Ribeiro Navarro de Andrade (@tiagonavarro).</description>
    <link>https://dev.to/tiagonavarro</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%2F906650%2F432a3b7f-79ea-4cf2-aa5e-2eb452355dd9.jpeg</url>
      <title>DEV Community: Tiago Ribeiro Navarro de Andrade</title>
      <link>https://dev.to/tiagonavarro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tiagonavarro"/>
    <language>en</language>
    <item>
      <title>The Database Is a Detail. The Data Is Not.</title>
      <dc:creator>Tiago Ribeiro Navarro de Andrade</dc:creator>
      <pubDate>Wed, 30 Sep 2026 19:44:04 +0000</pubDate>
      <link>https://dev.to/tiagonavarro/the-database-is-a-detail-the-data-is-not-1bc0</link>
      <guid>https://dev.to/tiagonavarro/the-database-is-a-detail-the-data-is-not-1bc0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Clean Architecture was right to push the database to the edge. The mistake was pushing everything the product needs to know about itself along with it.&lt;/strong&gt;&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%2F4yqplhrd8r1c921pumtp.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%2F4yqplhrd8r1c921pumtp.png" alt=" " width="799" height="450"&gt;&lt;/a&gt;&lt;br&gt;
The diagram filled the entire screen. It showed the new order flow: creation, payment, inventory, cancellation, and refund, each handled by its own service. Queues were named, retries configured, there was a &lt;em&gt;circuit breaker&lt;/em&gt; between payment and inventory, and even the authentication flow had been drawn arrow by arrow. It was good work.&lt;/p&gt;

&lt;p&gt;In the bottom-right corner, there was a gray box, smaller than the others, labeled "Analytics." A dotted arrow pointed to it.&lt;/p&gt;

&lt;p&gt;Nobody mentioned it during the presentation.&lt;/p&gt;

&lt;p&gt;Nobody asked, for example, how the business would know &lt;em&gt;why&lt;/em&gt; orders were being cancelled. The cancellation service changed the order &lt;code&gt;status&lt;/code&gt; to &lt;code&gt;CANCELLED&lt;/code&gt; and moved on. The reason lived in a log, if it was recorded at all.&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%2F1wuco5kzfpy234yfakyl.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%2F1wuco5kzfpy234yfakyl.png" alt=" " width="799" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A reconstruction of the scene: everything was detailed except the box where the business would eventually discover why orders were being cancelled.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I have seen this scene two or three times, across different teams, working with very good software engineers. And as a data engineer, it bothers me for a specific reason.&lt;/p&gt;

&lt;p&gt;That gray box is where the product finds out whether it is actually working.&lt;/p&gt;

&lt;p&gt;It is where conversion metrics come from. It is where the risk model gets its inputs and where the regulatory report gets its numbers. Increasingly, it is also where an AI agent gets the context it needs to make a decision.&lt;/p&gt;

&lt;p&gt;The question behind this article is simple: if data is so central to the product, why does it appear as a footnote in the architecture?&lt;/p&gt;
&lt;h2&gt;
  
  
  What Uncle Bob Said, and Why He Was Right
&lt;/h2&gt;

&lt;p&gt;In &lt;em&gt;Clean Architecture&lt;/em&gt;, Robert C. Martin dedicates an entire chapter to a provocative statement: "The Database Is a Detail."&lt;/p&gt;

&lt;p&gt;The argument is solid.&lt;/p&gt;

&lt;p&gt;Business rules, the entities and use cases at the center of the circles, should not know whether their data lives in Oracle, MySQL, or a file. The database belongs in the outermost ring, alongside frameworks, drivers, and the web interface.&lt;/p&gt;

&lt;p&gt;Dependencies always point inward: the database knows about the domain, but the domain does not know about the database.&lt;/p&gt;

&lt;p&gt;I agree with this completely.&lt;/p&gt;

&lt;p&gt;An architectural decision should not be held hostage by the choice between Postgres and DynamoDB. Anyone who has migrated a system tightly coupled to an ORM knows the cost of ignoring that advice.&lt;/p&gt;

&lt;p&gt;But there is a detail in that chapter that is easy to overlook.&lt;/p&gt;

&lt;p&gt;Martin distinguishes between two things: the &lt;strong&gt;data model&lt;/strong&gt;, which he considers architecturally significant, and the &lt;strong&gt;technology&lt;/strong&gt; used to store and retrieve that data, which is the detail.&lt;/p&gt;

&lt;p&gt;The database is a detail.&lt;/p&gt;

&lt;p&gt;The structure of the information is not.&lt;/p&gt;

&lt;p&gt;In the order flow from the beginning of this article, the distinction is easy to see. Storing a cancellation in a Postgres table or a MongoDB document is a detail. But the rule that a cancellation has a reason, a refunded amount, and a timestamp, and that this fact matters to the business, belongs to the model.&lt;/p&gt;

&lt;p&gt;That was exactly the part missing from the diagram.&lt;/p&gt;

&lt;p&gt;The problem starts when this distinction gets lost in practice.&lt;/p&gt;
&lt;h2&gt;
  
  
  Where the Interpretation Goes Wrong
&lt;/h2&gt;

&lt;p&gt;In practice, "the database is a detail" has often turned into "data is a detail."&lt;/p&gt;

&lt;p&gt;They sound similar, but they are not.&lt;/p&gt;

&lt;p&gt;The transactional database is where the system stores its state so it can operate. But the product needs to know much more about its own data than its current state:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what happened, not just what the current state is. The order was cancelled, but when, by whom, and after how many attempts?&lt;/li&gt;
&lt;li&gt;reliable history for auditing, regulation, and learning;&lt;/li&gt;
&lt;li&gt;whether a feature actually produced the expected outcome;&lt;/li&gt;
&lt;li&gt;the information required by models, recommendation systems, and now agents that make decisions autonomously based on that context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these are infrastructure details. They are business requirements.&lt;/p&gt;

&lt;p&gt;The decision that a "payment declined" event needs to include the reason for the decline does not belong to the DBA or the data team. It comes from the business rules.&lt;/p&gt;

&lt;p&gt;When architecture pushes all of this into the &lt;em&gt;frameworks &amp;amp; drivers&lt;/em&gt; ring, something predictable happens.&lt;/p&gt;

&lt;p&gt;The use case does not produce the information the business actually needs.&lt;/p&gt;

&lt;p&gt;So someone comes along later and tries to reconstruct it from the final state of the transactional database.&lt;/p&gt;

&lt;p&gt;That is how we end up with pipelines reverse-engineering application tables, &lt;code&gt;updated_at&lt;/code&gt; columns being treated as sources of truth, and dashboards that "sometimes don't match."&lt;/p&gt;

&lt;p&gt;The gray box in the corner is not small because its job is simple.&lt;/p&gt;

&lt;p&gt;It is small because its work was postponed.&lt;/p&gt;

&lt;p&gt;And postponing it makes it more expensive.&lt;/p&gt;
&lt;h2&gt;
  
  
  Data Engineering Has Already Become Software Engineering
&lt;/h2&gt;

&lt;p&gt;Part of the problem is perception.&lt;/p&gt;

&lt;p&gt;Many software engineers still picture data engineering as it existed fifteen years ago.&lt;/p&gt;

&lt;p&gt;In 2004, Google published the MapReduce paper. Hadoop followed, with HDFS and batch jobs running overnight. Back then, "data" really was a separate world: scripts, nightly loads, specialized tools, and a separate team receiving a production database dump and figuring out what to do with it.&lt;/p&gt;

&lt;p&gt;That world has changed.&lt;/p&gt;

&lt;p&gt;Modern data engineering uses version control, automated testing, CI/CD, infrastructure as code, schema contracts, observability, and real-time streaming. Tools like dbt brought pull requests and code reviews into data transformation workflows. Kafka, created at LinkedIn and open-sourced in 2011, became a common component in microservice architectures.&lt;/p&gt;

&lt;p&gt;And here is the irony: software engineers already use data engineering practices every day.&lt;/p&gt;

&lt;p&gt;Topics, queues, events, &lt;em&gt;event sourcing&lt;/em&gt;, CDC (&lt;em&gt;change data capture&lt;/em&gt;, capturing database changes as a stream of events), and the &lt;em&gt;outbox&lt;/em&gt; pattern are part of the same vocabulary.&lt;/p&gt;

&lt;p&gt;The boundary between the two disciplines has almost disappeared in the code.&lt;/p&gt;

&lt;p&gt;But it is still there in the diagram.&lt;/p&gt;

&lt;p&gt;With AI agents, that boundary becomes even harder to defend.&lt;/p&gt;

&lt;p&gt;An agent making decisions based on customer history depends on the quality, semantics, and freshness of that data. If the data is bad, the agent does not simply become "less accurate."&lt;/p&gt;

&lt;p&gt;It starts making the wrong decisions autonomously and at scale.&lt;/p&gt;
&lt;h2&gt;
  
  
  So Should the Database Move to the Center?
&lt;/h2&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;This is important because it is the easy, and wrong, conclusion.&lt;/p&gt;

&lt;p&gt;Moving the database, or the data platform, to the center of the circles would repeat exactly the mistake Uncle Bob was trying to prevent: coupling business rules to technology.&lt;/p&gt;

&lt;p&gt;No use case should know whether an event is going to Kafka, Pub/Sub, or a bucket.&lt;/p&gt;

&lt;p&gt;Something else needs to move to the center: &lt;strong&gt;data requirements&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;My proposal is to treat as part of the domain what is usually left implicit today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Domain events as use case outputs.&lt;/strong&gt; "Order cancelled" is a business fact, with meaning and fields defined by the business. It should be modeled alongside the entity, not discovered later by comparing database snapshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data contracts as interfaces.&lt;/strong&gt; The schema of what a service exposes to the analytical world is a public API. It deserves versioning, review, and compatibility guarantees just like any endpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ports for publishing, adapters at the edge.&lt;/strong&gt; The use case declares "I need to publish this fact" through an interface, a &lt;em&gt;port&lt;/em&gt; in hexagonal architecture terminology. The technology implementing that interface remains a detail.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, the dependency rule still holds.&lt;/p&gt;

&lt;p&gt;What changes is that information is intentionally produced by the center instead of being hastily extracted from the edge.&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%2F3jumywt3akm91x2k0a2i.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%2F3jumywt3akm91x2k0a2i.png" alt=" " width="800" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data requirements, shown in orange, originate at the center. Technology, shown in gray, remains at the edge, and dependencies still point inward.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What This Looks Like in Code
&lt;/h2&gt;

&lt;p&gt;A minimal example makes the idea more concrete.&lt;/p&gt;

&lt;p&gt;Below is a use case for cancelling an order. Notice that it knows nothing about Kafka, databases, or warehouses.&lt;/p&gt;

&lt;p&gt;But as a business rule, it does know that a cancellation is a fact that must be published, and it knows which information that fact contains.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Protocol&lt;/span&gt;


&lt;span class="nd"&gt;@dataclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frozen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderCancelled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;             &lt;span class="c1"&gt;# defined by the business, not the data team
&lt;/span&gt;    &lt;span class="n"&gt;refunded_amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;    &lt;span class="c1"&gt;# in cents
&lt;/span&gt;    &lt;span class="n"&gt;cancelled_at&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EventPublisher&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Protocol&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OrderCancelled&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The event and the port live at the center.&lt;/p&gt;

&lt;p&gt;The use case simply brings them together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CancelOrder&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;EventPublisher&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;events&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;events&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cancel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;events&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="nc"&gt;OrderCancelled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;refunded_amount&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;amount_paid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;cancelled_at&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things are worth noticing.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;OrderCancelled&lt;/code&gt; is a domain structure, with a name and fields that anyone working on the product can understand.&lt;/p&gt;

&lt;p&gt;The use case depends only on the &lt;code&gt;EventPublisher&lt;/code&gt; interface, not on any specific technology.&lt;/p&gt;

&lt;p&gt;And the concrete implementation, perhaps a transactional &lt;em&gt;outbox&lt;/em&gt; that eventually publishes to Kafka, lives in the outer ring, exactly where it belongs.&lt;/p&gt;

&lt;p&gt;The difference from the common scenario is that nobody needs to come along months later and figure out how to infer the cancellation reason from an overwritten &lt;code&gt;status&lt;/code&gt; column.&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%2F42x0civtmpamfelxiwtu.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%2F42x0civtmpamfelxiwtu.png" alt=" " width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The use case decides what to publish. Outbox, Kafka, and consumers can change without touching the domain.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changes in the Architecture Diagram
&lt;/h2&gt;

&lt;p&gt;If I could ask for one change in architecture reviews, it would be this:&lt;/p&gt;

&lt;p&gt;The gray box stops being a box and becomes a set of questions.&lt;/p&gt;

&lt;p&gt;Before approving the design, the team should answer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What business facts does this solution produce, and who needs them?&lt;/li&gt;
&lt;li&gt;What is the contract for those facts, including fields, meaning, and version, and who owns it?&lt;/li&gt;
&lt;li&gt;How will we use data to determine whether this feature actually worked?&lt;/li&gt;
&lt;li&gt;What history do we need to preserve for auditing, regulation, or models?&lt;/li&gt;
&lt;li&gt;If an agent or model consumes this data, what happens when the data is wrong or delayed?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these questions requires choosing a technology.&lt;/p&gt;

&lt;p&gt;They require business decisions.&lt;/p&gt;

&lt;p&gt;That is why they belong at the center of the conversation, not in a footnote.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I Might Be Wrong
&lt;/h2&gt;

&lt;p&gt;Not every system needs this.&lt;/p&gt;

&lt;p&gt;An internal CRUD application with ten users does not need versioned event contracts. Requiring them would just create bureaucracy.&lt;/p&gt;

&lt;p&gt;There is also a real risk of polluting the domain with analytical requirements that change every week. If every dashboard request turns into a new field on an entity, the solution becomes another problem.&lt;/p&gt;

&lt;p&gt;The filter I use is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Would this fact still make sense to the business if no dashboard existed?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Order cancelled because the item was out of stock" passes the test.&lt;/p&gt;

&lt;p&gt;"Helper column for the quarterly report" does not.&lt;/p&gt;

&lt;p&gt;There is also an organizational argument I respect. In many companies, the boundary in the architecture diagram reflects the boundary between teams. Changing the diagram without changing ownership does not solve anything.&lt;/p&gt;

&lt;p&gt;Approaches such as &lt;em&gt;data mesh&lt;/em&gt; and "data as a product" are, in part, attempts to address exactly this problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Is Not a Detail
&lt;/h2&gt;

&lt;p&gt;Uncle Bob was right about the database.&lt;/p&gt;

&lt;p&gt;Oracle, MySQL, and Kafka are details, and the architecture should remain independent of them.&lt;/p&gt;

&lt;p&gt;But the data a product generates about itself is not a detail.&lt;/p&gt;

&lt;p&gt;It is how the business knows what happened, proves what it did, and decides what to do next, increasingly without a human in the loop.&lt;/p&gt;

&lt;p&gt;If you design software architecture, try three things in your next proposal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;model domain events alongside entities, as explicit outputs of use cases;&lt;/li&gt;
&lt;li&gt;treat event schemas as public contracts, with ownership and versioning;&lt;/li&gt;
&lt;li&gt;bring someone from data into the architecture review &lt;em&gt;before&lt;/em&gt; the final design, not after the first broken dashboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gray box in the corner was never small.&lt;/p&gt;

&lt;p&gt;It was just drawn in the wrong place.&lt;/p&gt;

&lt;p&gt;If you have experienced the scene from the beginning of this article, from either side of the table, share it in the comments. I would like to hear how other teams have approached this problem.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>microservices</category>
      <category>software</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Redes Sociais — 2ª verdade dolorosa</title>
      <dc:creator>Tiago Ribeiro Navarro de Andrade</dc:creator>
      <pubDate>Wed, 10 Aug 2022 17:39:52 +0000</pubDate>
      <link>https://dev.to/tiagonavarro/redes-sociais-2a-verdade-dolorosa-1enp</link>
      <guid>https://dev.to/tiagonavarro/redes-sociais-2a-verdade-dolorosa-1enp</guid>
      <description>&lt;p&gt;Ontem me peguei contemplando as maravilhas dos avanços tecnológicos que mudaram a minha rotina, e o modo como se deu essa mudança. Fiz o pedido do meu almoço pelo iFood, e me dei conta, que o aplicativo não permitia eu acompanhar o deslocamento da refeição até minha casa (e o pedido demorou mais de 01 hora pra chegar), fiquei um pouco irritado com o fato, e como a aplicação não me dava a possibilidade de acompanhar o que estava acontecendo. Daí pude refletir na 2ª verdade dolorosa das redes sociais.&lt;/p&gt;

&lt;p&gt;Por definição rede social é:&lt;/p&gt;

&lt;p&gt;Uma estrutura social composta por pessoas ou organizações, conectadas por um ou vários tipos de relações, que compartilham valores e objetivos comuns.&lt;/p&gt;

&lt;p&gt;E na definição de estrutura social temos que:&lt;/p&gt;

&lt;p&gt;Refere-se à colocação e à posição de indivíduos e de grupos dentro de um sistema, partindo-se da constatação de que os membros e os grupos de uma sociedade são unidos por um sistema de relações de obrigação, isto é, por uma série de direitos e deveres, aceitos e praticados entre si.&lt;/p&gt;

&lt;p&gt;Diante disso podemos compreender as redes sociais como sistemas de informação. A proliferação de aplicativos como Uber, iFood, e qualquer outro que mudou nossas relações com as empresas de serviço, no fundo, veem funcionando como sistemas de informações.&lt;/p&gt;

&lt;p&gt;Os Sistemas de Informações são modelos, automatizados ou manuais, de processos responsáveis por coletar e transmitir dados que sejam úteis ao desenvolvimento de produtos ou serviços das empresas, organizações e de demais projetos. Portanto essas aplicações expandiram suas fronteiras, e/ou aproximaram os clientes de seus processos de descoberta de conhecimento.&lt;/p&gt;

&lt;p&gt;Aproximadamente há 10 anos atrás tínhamos a predominância dos sistemas para desktop, e as técnicas de marketing ainda eram voltadas para as pesquisas de perfis de cliente. Vimos chegar até nós Orkut, Facebook e as demais redes sociais, e com eles a possibilidade de exploração dos perfis de usuários.&lt;/p&gt;

&lt;p&gt;É por esse motivo que a cada dia mais empresas se valem do fenômeno da Uberização. Notaram que pode-se valer da coleta de dados dos clientes de forma consentida, e mais aproximada da necessidade do cliente, de suas preferencias e até obter feedbacks menos enviesados, pois virá de livre e espontânea vontade, não de respostas dadas pra se livrar do formulário de satisfação. Através do aplicativo também há a possibilidade de se mapear as preferencias por áreas, os fluxos sazonais. Uma grande concentração de informações valiosas para a saúde financeira das empresas.&lt;/p&gt;

&lt;p&gt;As redes sociais tem aproximado e alienado as sociedades, muitos terão essa opinião, mas, vale a pena ter em mente que, as empresas privadas visão o lucro, e por esse motivo, sempre se reinventarão e buscaram encontrar métodos e técnicas que possibilitem ampliar sua produção e escoamento de suas produções materiais e imateriais, e por conta disso, irão sempre necessitar da participação do ser humano. O que nos aproxima ou distancia é a nossa incapacidade de lidar com as abstrações da realidade, o nosso desejo de encontrar significados em instrumentos que tornem nossa vivencia menos dolorosa.&lt;/p&gt;

&lt;p&gt;Os sistemas de descoberta de conhecimento sempre existiram. O nosso desejo de compreender o que nos rodeia sempre existirá. Caberá sempre a todos nós estarmos a par com os avanços que o futuro nos trará.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Redes Sociais — 1ª verdade dolorosa</title>
      <dc:creator>Tiago Ribeiro Navarro de Andrade</dc:creator>
      <pubDate>Wed, 10 Aug 2022 17:38:00 +0000</pubDate>
      <link>https://dev.to/tiagonavarro/redes-sociais-1a-verdade-dolorosa-3meb</link>
      <guid>https://dev.to/tiagonavarro/redes-sociais-1a-verdade-dolorosa-3meb</guid>
      <description>&lt;p&gt;No inicio dos anos 2000 fomos surpreendidos por uma significativa mudança na nossa relação com o universo tecnológico — o Second Life. Para quem não se lembra ou não fez questão de conhece-lo na época, se trata de um jogo que prometia virtualizar a nossa realidade num ambiente gráfico tridimensional contento aspectos que simularia nossas vidas real e social.&lt;/p&gt;

&lt;p&gt;O jogo alcançou seu auge lá por volta do ano de 2007, após 4 anos do seu lançamento, chamando a atenção da mídia internacional pela quantidade de participantes, porem, depois desse período ele foi superado por outras redes sociais.&lt;/p&gt;

&lt;p&gt;Sem entrar em detalhes da complexidade desse ambiente virtual que pretendia simular muitos aspectos do que denominamos “vida real”, e o que me levou a pensar em uma análise das redes sociais em mais de um post (por isso o título enumerando mais de uma verdade, parafraseando Budda em sua metodologia para estudar o sofrimento humano — as 8 nobres verdades), vamos observar um ponto que o transformava em uma pedra no sapato dos usuários — a monetização da rede social.&lt;/p&gt;

&lt;p&gt;Qualquer rede social se sustenta em dois pilares, em uma ponta há os usuários e na outra os seus desenvolvedores, e por mais que nos esqueçamos, todo aquele que empreende almeja receber o retorno do seu esforço em empreender.&lt;/p&gt;

&lt;p&gt;Estou desenvolvendo um estudo em que avalia a propagação das postagens em redes sociais. Tem me chamado a atenção o modo como nos rendemos a essa virtualização de nossas realidades, como precisamos da validação de nossas opiniões em redes sociais e como tem sido importante concordarmos com uma sutil imposição que elas nos apresenta — devemos ter opiniões formadas sobre qualquer assunto.&lt;/p&gt;

&lt;p&gt;De maneira geral as redes sociais funcionam com o compartilhamento de informações dentro de seus ambientes virtuais. Em muitas delas o objeto a ser compartilhado é um texto, fotos, vídeos, ou qualquer outro conteúdo de mídia que expresse uma opinião ou sentimento, e que é convertido naquela plataforma como informação sobre os usuários. Essas informações são a monetização da rede social, elas possuem muito valor agregado e que o nosso encantamento por estar pertencendo a um ambiente virtual nos leva a distração dessa verdade.&lt;/p&gt;

&lt;p&gt;Atualmente quase todas as redes sociais limitam a propagação de nossas postagens a uma taxa de conversão muito baixa, o que nos permite dizer que as viralizações estão sumindo do nosso cotidiano às custas de postagens patrocinadas, quer dizer, deve-se remonetizar a nossa experiência para ser vistos e “ouvidos”. As redes sociais que ainda mantem taxas orgânicas de propagação são o YouTube, pois esse é o seu negocio — se passar a limitar views perderá o sentido de ser, e o LinkedIn, que até incentiva os seus usuários a criarem artigos.&lt;/p&gt;

&lt;p&gt;Quem deseja ser reconhecido nas redes sociais, principalmente as empresas, que buscam o ambiente virtual para tornarem suas marcas conhecidas, deverá se tornar consciente das limitações que por enquanto encontramos nas realidades virtualizadas. Há necessidade de se investir tempo e dinheiro, e afastar a crença de que o meio virtual seja mais simples, em realidade é o oposto, se faz necessário muito estudo, das métricas de cada rede, e dedicação no fortalecimento do seu empreendimento.&lt;/p&gt;

&lt;p&gt;Por hora vou ficar por aqui e em breve trago um novo ponto para refletirmos.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
