<?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: xytras</title>
    <description>The latest articles on DEV Community by xytras (@xytras).</description>
    <link>https://dev.to/xytras</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%2F3578733%2F526b0df4-4700-4d5f-a8e0-2bfca420f14d.png</url>
      <title>DEV Community: xytras</title>
      <link>https://dev.to/xytras</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xytras"/>
    <language>en</language>
    <item>
      <title>Three things every indie multiplayer game gets wrong in production</title>
      <dc:creator>xytras</dc:creator>
      <pubDate>Fri, 15 May 2026 20:26:22 +0000</pubDate>
      <link>https://dev.to/xytras/three-things-every-indie-multiplayer-game-gets-wrong-in-production-3m8j</link>
      <guid>https://dev.to/xytras/three-things-every-indie-multiplayer-game-gets-wrong-in-production-3m8j</guid>
      <description>&lt;p&gt;Most indie multiplayer games ship with three architectural decisions that look fine at MVP and break somewhere between 50 and 500 concurrent players. After hosting servers for indie survival/MMO games across UE, Unity, and Godot for several years, these are the three failure modes I keep seeing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 1: Trusting the client for any value that affects other players
&lt;/h2&gt;

&lt;p&gt;The pattern: the client computes "I dealt 25 damage to player X" or "my final survival time was 14:32" and sends that to the server. The server records it.&lt;/p&gt;

&lt;p&gt;This fails the moment one player decompiles the client and starts sending fake values. They're suddenly invincible, or topping leaderboards with impossible scores, or duplicating resources. Trust collapses for the honest players who watched it happen.&lt;/p&gt;

&lt;p&gt;The fix that has held up: server-authoritative on anything that touches other players. The client sends INTENT ("I shot at player X from this position") and the server validates and applies. Latency goes up because there's a round trip. Cheat surface drops to almost zero because the client never gets to be the source of truth on anything competitive.&lt;/p&gt;

&lt;p&gt;Single-player progression can stay client-side. Leaderboards, PvP outcomes, shared world state, currency. None of those can.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 2: No versioning or event log on player save data
&lt;/h2&gt;

&lt;p&gt;The pattern: each player's save is a JSON blob. Every save overwrites the previous version. The only backup is whatever your hosting provider's nightly snapshot grabbed.&lt;/p&gt;

&lt;p&gt;This fails when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A bad patch corrupts saves and you find out 18 hours later.&lt;/li&gt;
&lt;li&gt;A duplication exploit briefly works and you can't tell which players exploited.&lt;/li&gt;
&lt;li&gt;Two parallel sessions (player reconnects on phone while desktop session still active) race-condition on the same save.&lt;/li&gt;
&lt;li&gt;A support ticket comes in saying "I lost 3 hours of progress" and you can only restore to 4am yesterday.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix: per-player append-only event log. The "save" becomes a projection of events. Rollback to any second is a re-projection from event N, not a restore from backup. Audit becomes trivial because every progression jump has a source event. Race conditions become detectable instead of silent.&lt;/p&gt;

&lt;p&gt;This is more work than a JSON blob. It's also the difference between "support is a war zone" and "support takes 5 minutes."&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 3: One binary doing auth, matchmaking, simulation, persistence, and anti-cheat
&lt;/h2&gt;

&lt;p&gt;The pattern: the game server process does everything. Player auth happens in the same binary as the world tick. Persistence writes block on the same thread as physics. Anti-cheat runs inline with the simulation step.&lt;/p&gt;

&lt;p&gt;This fails because those workloads are different shapes. World simulation is CPU-bound. Auth is I/O-bound and bursty. Persistence is database-bound and write-heavy. Anti-cheat scans are CPU-bursty.&lt;/p&gt;

&lt;p&gt;When you bolt them all into one process, you get cascading failures. A noisy auth attack spikes CPU and the world tick starts dropping frames. A bad database write blocks for 200ms and the simulation hitches. An anti-cheat scan kicks in and 80 players see a momentary disconnect.&lt;/p&gt;

&lt;p&gt;The fix is unglamorous: split the stateless concerns out. Auth, persistence, matchmaking, anti-cheat coordination all live as separate services that talk to the game server over an internal API. The game server keeps the one job that only it can do, which is running the world simulation. Everything else scales horizontally, fails independently, and can be replaced without taking down the game.&lt;/p&gt;

&lt;p&gt;Most indie games discover this around the time they hit 100-200 concurrent and players start reporting "everyone got disconnected for 90 seconds." That's usually one of the stateless concerns starving the simulation thread.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape that works
&lt;/h2&gt;

&lt;p&gt;The three fixes share a pattern: separate concerns that have different failure modes, and don't let the client be the source of truth for anything that crosses the player boundary.&lt;/p&gt;

&lt;p&gt;If you want to read deeper on the architecture that holds these together, I've written about the tick-server vs event-driven split here: &lt;a href="https://gsb.supercraft.host/blog/multiplayer-game-backend-architecture/" rel="noopener noreferrer"&gt;https://gsb.supercraft.host/blog/multiplayer-game-backend-architecture/&lt;/a&gt; and on per-player event-sourcing for save data here: &lt;a href="https://gsb.supercraft.host/blog/player-data-schema-design-nosql-vs-sql/" rel="noopener noreferrer"&gt;https://gsb.supercraft.host/blog/player-data-schema-design-nosql-vs-sql/&lt;/a&gt;. The orchestration side (splitting stateless services from the game server) is covered here: &lt;a href="https://gsb.supercraft.host/blog/game-server-orchestration-guide/" rel="noopener noreferrer"&gt;https://gsb.supercraft.host/blog/game-server-orchestration-guide/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;None of this is required at 5 players. All of it becomes required somewhere between 50 and 500 concurrent. The earlier you put the architecture in place, the cheaper the migration is.&lt;/p&gt;

&lt;p&gt;What's the failure mode you've seen most often in production multiplayer? I've been catching mostly category 3 lately as more indie teams hit the auth-starves-simulation problem.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>multiplayer</category>
      <category>backend</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Why most AI agent memory implementations break in production</title>
      <dc:creator>xytras</dc:creator>
      <pubDate>Fri, 15 May 2026 07:51:40 +0000</pubDate>
      <link>https://dev.to/xytras/why-most-ai-agent-memory-implementations-break-in-production-3ep7</link>
      <guid>https://dev.to/xytras/why-most-ai-agent-memory-implementations-break-in-production-3ep7</guid>
      <description>&lt;p&gt;Every team trying to give AI agents memory is solving the same three problems badly. After running production agent memory for several months across two codebases, here are the failure modes I keep hitting and the one pattern that actually works.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 1: Embed everything as vectors and call it memory
&lt;/h2&gt;

&lt;p&gt;The instinct is reasonable. You have a vector database, you have embeddings, you have a retrieval API. Memory looks like "stuff a conversation in, get relevant chunks out." So you dump every session's transcript, every decision, every code review into the same embedding store and retrieve by similarity.&lt;/p&gt;

&lt;p&gt;This breaks because facts and conversations have different retrieval shapes.&lt;/p&gt;

&lt;p&gt;Ask the agent "what did we decide about JWT vs opaque session tokens?" and the embedding store returns five things kind-of-about-tokens by vector similarity. Three of them are old debate snippets. One is a tangential comment from a different feature. The actual decision record is in there somewhere, ranked alongside the noise.&lt;/p&gt;

&lt;p&gt;The agent then synthesizes an answer from "five tokenish memories," which gives you a confident summary of the team's thoughts on tokens. What you actually wanted was the single decision record that says "use opaque session tokens, set 2025-04-12, still active."&lt;/p&gt;

&lt;p&gt;The fix isn't to abandon vectors. It's to separate the layers. Structured decision records get an id, a claim, a source, an active_at, and (when relevant) a supersedes_id. Conversations and exploratory reasoning stay in the embedding store. Queries hit both, merge, and prioritize structured records over vector neighbors when the structured record exists for the same topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 2: Summarize and discard
&lt;/h2&gt;

&lt;p&gt;The pattern: every session, the agent writes a summary of what happened. The raw events are discarded. The next session starts by loading the summary.&lt;/p&gt;

&lt;p&gt;This breaks because summaries are lossy compressions, and the next summary compresses the first summary, not the original events.&lt;/p&gt;

&lt;p&gt;A real example I watched happen across four sessions on the same project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Session 1: "We agreed to enforce idempotency at the receiver before any side-effect fires. Webhook X currently doesn't and that's blocking the migration."&lt;/li&gt;
&lt;li&gt;Session 1 summary: "Decided idempotency must be enforced at the receiver. Webhook X needs updating."&lt;/li&gt;
&lt;li&gt;Session 2 summary (built from session 1 summary): "Idempotency is being enforced at the receiver. Webhook X update is in progress."&lt;/li&gt;
&lt;li&gt;Session 3 summary: "Idempotency is enforced at the receiver. Webhook X has been updated."&lt;/li&gt;
&lt;li&gt;Session 4: "The webhook layer enforces idempotency."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Webhook X was never updated. The agent now believes a thing that isn't true and will plan against that belief.&lt;/p&gt;

&lt;p&gt;The fix is to keep events as the source of truth. Summaries reference event ids, not free text. When a summary goes weird, you can re-summarize from the events with a fresh model and recover the original signal. Without this, you're playing a game of telephone with your own state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure 3: Append-only memory with no supersedes-relations
&lt;/h2&gt;

&lt;p&gt;The pattern: every decision becomes a new record. Old records aren't deleted because deleting historical context feels wrong. Conflicts resolve at retrieval time by "newest wins" or by vibes.&lt;/p&gt;

&lt;p&gt;This breaks because retrieval relevance and recency are different ranking signals, and "newest wins" doesn't apply when both records are perfectly relevant.&lt;/p&gt;

&lt;p&gt;Concrete: "We use JWT for service-to-service auth" gets recorded in week 1. In week 4 the team switches: "We replaced JWT with opaque session tokens for service-to-service. JWT is deprecated." Both records exist. Both are retrievable.&lt;/p&gt;

&lt;p&gt;In week 8, the agent is asked about service-to-service auth. The query phrasing happens to match the JWT record more strongly (because the JWT record uses the exact phrase "service-to-service" while the replacement record uses "S2S"). The agent confidently retrieves "we use JWT" and starts building against it.&lt;/p&gt;

&lt;p&gt;This isn't a hypothetical. I have seen it in production three separate times across two projects. The fix is supersedes-relations as a first-class concept. When a decision replaces another, the new record points at the old via supersedes_id. Retrieval filters out superseded records by default. The old record stays in the database for audit, but it's not surfaced unless explicitly queried.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern that does work
&lt;/h2&gt;

&lt;p&gt;The shape that has held up under load for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decisions are records, not sentences.&lt;/strong&gt; Each one has an id, a textual claim, a source (link, transcript ref, doc), an active_at timestamp, and a supersedes_id field that's null unless this record replaces another.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provenance is mandatory.&lt;/strong&gt; A record without a source is auto-flagged as low-trust. The agent can't ground an answer in a record it can't trace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supersedes-relations are first-class.&lt;/strong&gt; Replacements use the supersedes_id field, not deletion or "newest wins."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversations stay in the embedding store, separately.&lt;/strong&gt; Vector retrieval finds discussions. Structured retrieval finds decisions. Both run for each query, and structured wins when they conflict.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resummarization runs against events, never against the previous summary.&lt;/strong&gt; Summaries are derived data, refreshed periodically. They never become the source of truth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pattern is tool-agnostic. You can implement it with sqlite and a few tables. You can implement it with a managed memory service. The implementation that matters isn't the storage layer, it's the discipline of treating decisions as records with provenance and supersedes.&lt;/p&gt;

&lt;p&gt;If you want to read further on why structure beats pure vector retrieval for this exact problem, I went deeper on the agent-memory-vs-vector-db decision tree here: &lt;a href="https://memnode.dev/articles/agent-memory-vs-vector-db" rel="noopener noreferrer"&gt;https://memnode.dev/articles/agent-memory-vs-vector-db&lt;/a&gt;. And on why inspectable provenance beats opaque embeddings for trust here: &lt;a href="https://memnode.dev/articles/lineage-and-provenance-in-agent-memory" rel="noopener noreferrer"&gt;https://memnode.dev/articles/lineage-and-provenance-in-agent-memory&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Curious what failure modes other people are hitting. The three above are the ones I keep seeing. There's probably a fourth I haven't caught yet.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
