<?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: Edna112</title>
    <description>The latest articles on DEV Community by Edna112 (@edna112).</description>
    <link>https://dev.to/edna112</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%2F1484103%2F883483a4-6d85-4eec-8fe8-87148fcbf505.png</url>
      <title>DEV Community: Edna112</title>
      <link>https://dev.to/edna112</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/edna112"/>
    <language>en</language>
    <item>
      <title>Let's Talk About idempotency</title>
      <dc:creator>Edna112</dc:creator>
      <pubDate>Tue, 21 Apr 2026 02:38:59 +0000</pubDate>
      <link>https://dev.to/edna112/lets-talk-about-idempotency-53pp</link>
      <guid>https://dev.to/edna112/lets-talk-about-idempotency-53pp</guid>
      <description>&lt;p&gt;“The payment went through twice.”&lt;/p&gt;

&lt;p&gt;That’s what my friend told me.&lt;/p&gt;

&lt;p&gt;We were talking about a system he was building.Everything looked fine.&lt;/p&gt;

&lt;p&gt;Payments were working. Users were happy. Until one day. Someone got charged twice. No crash,No error Just the same request…Processed twice.&lt;/p&gt;

&lt;p&gt;The problem&lt;/p&gt;

&lt;p&gt;In real systems, requests don’t always happen once.&lt;/p&gt;

&lt;p&gt;They get:&lt;/p&gt;

&lt;p&gt;• retried by the client&lt;/p&gt;

&lt;p&gt;• resent after timeouts&lt;/p&gt;

&lt;p&gt;• triggered twice by impatient users&lt;/p&gt;

&lt;p&gt;The system didn’t understand that. So it did exactly what it was told.&lt;/p&gt;

&lt;p&gt;Twice.&lt;/p&gt;

&lt;p&gt;What was happening?&lt;/p&gt;

&lt;p&gt;The system treated every request as new. It had no memory of what it had already processed. So when the same request came in again…It processed it again.&lt;/p&gt;

&lt;p&gt;Why this is dangerous&lt;/p&gt;

&lt;p&gt;Nothing breaks. Everything “works”.&lt;/p&gt;

&lt;p&gt;But now you have:&lt;/p&gt;

&lt;p&gt;• duplicate payments&lt;/p&gt;

&lt;p&gt;• duplicate orders&lt;/p&gt;

&lt;p&gt;• inconsistent data&lt;/p&gt;

&lt;p&gt;And once money is involved… That’s a serious problem.&lt;/p&gt;

&lt;p&gt;The solution&lt;/p&gt;

&lt;p&gt;Design your system to be idempotent.&lt;/p&gt;

&lt;p&gt;Meaning:&lt;/p&gt;

&lt;p&gt;The same request can be sent multiple times…But only processed once.&lt;/p&gt;

&lt;p&gt;Real systems do this by:&lt;/p&gt;

&lt;p&gt;• attaching a unique request ID (idempotency key)&lt;/p&gt;

&lt;p&gt;• storing processed requests&lt;/p&gt;

&lt;p&gt;• rejecting or reusing previous results&lt;/p&gt;

&lt;p&gt;So even if the request comes in twice…The outcome stays the same.&lt;/p&gt;

&lt;p&gt;Mental model&lt;/p&gt;

&lt;p&gt;Think of it like submitting a form with a reference number.&lt;/p&gt;

&lt;p&gt;If you submit it again with the same number…&lt;/p&gt;

&lt;p&gt;The system knows:&lt;/p&gt;

&lt;p&gt;“I’ve already handled this.”&lt;/p&gt;

&lt;p&gt;The lesson&lt;/p&gt;

&lt;p&gt;In distributed systems, retries are normal.&lt;/p&gt;

&lt;p&gt;Duplicate effects should not be.&lt;/p&gt;

&lt;p&gt;Takeaway&lt;/p&gt;

&lt;p&gt;Your system shouldn’t just handle success.&lt;/p&gt;

&lt;p&gt;It should handle being asked to do the same thing… twice.&lt;/p&gt;

&lt;p&gt;Have you ever seen a system charge twice or create duplicate data?&lt;/p&gt;

&lt;h1&gt;
  
  
  backend #systemdesign #architecture #softwareengineering #laravel
&lt;/h1&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>softwareengineering</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>EVENTUAL INCONSISTENCY</title>
      <dc:creator>Edna112</dc:creator>
      <pubDate>Mon, 20 Apr 2026 11:08:43 +0000</pubDate>
      <link>https://dev.to/edna112/eventual-inconsistency-4hgj</link>
      <guid>https://dev.to/edna112/eventual-inconsistency-4hgj</guid>
      <description>&lt;p&gt;The system didn’t crash. But two parts of it disagreed. Everything looked normal. Requests were fast. No errors, No alerts. Then something subtle happened. A user checked their data from two different endpoints.Same request. Different answers,outdated. Not random. Just… inconsistent.&lt;br&gt;
The problem&lt;br&gt;
The system wasn’t behaving like a single system. It was behaving like multiple independent parts.&lt;br&gt;
What was happening?&lt;br&gt;
In distributed systems:&lt;br&gt;
There is no single source of truth at every moment.&lt;br&gt;
Different services, replicas, or nodes…&lt;br&gt;
Can see different versions of the same data.&lt;br&gt;
So two parts of your system can both be Correct. But not aligned.&lt;br&gt;
Why this is dangerous&lt;br&gt;
Nothing fails.&lt;br&gt;
Nothing crashes.&lt;br&gt;
But your system starts to:&lt;br&gt;
• contradict itself&lt;br&gt;
• confuse users&lt;br&gt;
• break trust&lt;br&gt;
And the worst part?&lt;br&gt;
It’s working exactly as designed.&lt;br&gt;
The solution&lt;br&gt;
You don’t assume consistency.&lt;br&gt;
You define it.&lt;br&gt;
Real systems make explicit choices:&lt;br&gt;
• Decide where strong consistency is required&lt;br&gt;
• Accept temporary inconsistency where it’s safe&lt;br&gt;
• Design flows that tolerate delayed synchronization&lt;br&gt;
• Ensure critical paths never rely on conflicting data&lt;br&gt;
Mental model&lt;br&gt;
Think of a team without synchronization. Everyone is working. Everyone is doing their job. But without alignment…They produce conflicting results.&lt;br&gt;
The lesson&lt;br&gt;
Distributed systems don’t naturally agree.&lt;br&gt;
Agreement is something you design.&lt;br&gt;
Takeaway&lt;br&gt;
A system isn’t reliable because it works.&lt;br&gt;
It’s reliable because it stays consistent across its parts.&lt;/p&gt;

&lt;h1&gt;
  
  
  backend #systemdesign #architecture #softwareengineering #laravel
&lt;/h1&gt;

</description>
      <category>architecture</category>
      <category>database</category>
      <category>distributedsystems</category>
      <category>systemdesign</category>
    </item>
  </channel>
</rss>
