<?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: iCe Gaming</title>
    <description>The latest articles on DEV Community by iCe Gaming (@icegaming).</description>
    <link>https://dev.to/icegaming</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%2F3181195%2Fee20f9ef-f613-487a-9e0a-d084dcaaf229.png</url>
      <title>DEV Community: iCe Gaming</title>
      <link>https://dev.to/icegaming</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/icegaming"/>
    <language>en</language>
    <item>
      <title>What My Coding Agent Gains From Local Memory</title>
      <dc:creator>iCe Gaming</dc:creator>
      <pubDate>Tue, 05 May 2026 07:18:08 +0000</pubDate>
      <link>https://dev.to/icegaming/what-my-coding-agent-gains-from-local-memory-3mbg</link>
      <guid>https://dev.to/icegaming/what-my-coding-agent-gains-from-local-memory-3mbg</guid>
      <description>&lt;p&gt;Every coding agent session starts with a strange contradiction.&lt;/p&gt;

&lt;p&gt;The model is capable. It can read code, reason through architecture, write tests, explain tradeoffs, and debug with patience. But the session itself is often forgetful.&lt;/p&gt;

&lt;p&gt;It does not remember why we chose SQLite over Postgres for a prototype. It does not remember that the migration layer had a weird compatibility constraint. It does not remember the conversation where we decided not to expose a public API yet. It does not remember the repeated instruction I keep typing into every project: "check the existing pattern first."&lt;/p&gt;

&lt;p&gt;So the human becomes the memory layer.&lt;/p&gt;

&lt;p&gt;We paste context. We summarize old threads. We say, "We already tried that." We ask the agent to search the repo again. We re-explain preferences. We lose twenty minutes to rediscovery before the actual work begins.&lt;/p&gt;

&lt;p&gt;That is the problem local agent memory is meant to solve.&lt;/p&gt;

&lt;p&gt;Not "AI consciousness." Not magic. Just durable, queryable context that lives near your tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shape Of The Problem
&lt;/h2&gt;

&lt;p&gt;Modern coding assistants are increasingly agentic. Claude Code, Cursor, Codex, and similar tools can inspect a project, call tools, edit files, run tests, and continue over multiple steps.&lt;/p&gt;

&lt;p&gt;But most agent workflows are still bounded by a session.&lt;/p&gt;

&lt;p&gt;A chat thread has context, but only while it is alive and only within that tool. A repository has source code, but not the decisions that led to it. A README has documentation, but not every debugging path, rejected approach, user preference, or handoff note.&lt;/p&gt;

&lt;p&gt;The most expensive thing is not always tokens. It is human time spent reconstructing context.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Where did we decide how migrations work?"&lt;/li&gt;
&lt;li&gt;"What did the last agent already try?"&lt;/li&gt;
&lt;li&gt;"Which files did we inspect when debugging this?"&lt;/li&gt;
&lt;li&gt;"What was the user's preference for this project?"&lt;/li&gt;
&lt;li&gt;"Did we already index this transcript?"&lt;/li&gt;
&lt;li&gt;"Which past session contains the actual reason for this architecture?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without memory, the answer is usually: search again, ask again, paste again.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Local Memory MCP
&lt;/h2&gt;

&lt;p&gt;The useful version of memory, for me, is not a giant prompt stuffed into every request.&lt;/p&gt;

&lt;p&gt;It is a local service the agent can query when needed.&lt;/p&gt;

&lt;p&gt;That is the idea behind &lt;a href="https://github.com/AncientiCe/mempalace-rs" rel="noopener noreferrer"&gt;MemPalace&lt;/a&gt;: a local-first memory MCP for agentic apps.&lt;br&gt;
MemPalace started from an earlier Python version of the idea. This Rust version is my attempt to make the same local-memory pattern faster, easier to install, and smoother to integrate with everyday agentic coding tools.&lt;br&gt;
It stores memories in a local SQLite database, embeds text locally, and exposes tools through the Model Context Protocol so clients like Claude Code, Cursor, and Codex can retrieve relevant context on demand.&lt;/p&gt;

&lt;p&gt;The important bit is "on demand."&lt;/p&gt;

&lt;p&gt;Instead of carrying a whole project history in every prompt, the agent can ask a narrower question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Search memory for how this project handles database migrations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query known facts about this project's release process.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That changes memory from "more prompt" into "local infrastructure."&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Stores
&lt;/h2&gt;

&lt;p&gt;MemPalace stores verbatim text rather than forcing everything through a summary first.&lt;/p&gt;

&lt;p&gt;That matters because summaries are useful, but lossy. They often flatten the exact sentence that later becomes important: the exception, the caveat, the "we tried this and it failed because..."&lt;/p&gt;

&lt;p&gt;The storage model is intentionally boring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One local SQLite database at &lt;code&gt;~/.mempalace/palace.db&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Drawers for text content, embeddings, and metadata&lt;/li&gt;
&lt;li&gt;Entity and triple tables for knowledge graph facts&lt;/li&gt;
&lt;li&gt;Local embeddings using ONNX Runtime and &lt;code&gt;all-MiniLM-L6-v2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Local cosine similarity and hybrid retrieval&lt;/li&gt;
&lt;li&gt;No API call required for embedding or search&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That boringness is a feature. Local memory should not need a cloud account just to remember your own project context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why MCP Matters
&lt;/h2&gt;

&lt;p&gt;MCP makes the same memory usable from multiple agentic apps.&lt;/p&gt;

&lt;p&gt;A memory layer is less useful if it only belongs to one editor or one chat product. The interesting workflow is when Claude Code, Cursor, and Codex can all consult the same local memory.&lt;/p&gt;

&lt;p&gt;MemPalace installs an MCP server and a small rule for each supported client. The rule tells the agent when to call memory tools, for example before answering about a person, project, past decision, or user preference.&lt;/p&gt;

&lt;p&gt;The common tools include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;mempalace_search&lt;/code&gt; for semantic retrieval&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mempalace_kg_query&lt;/code&gt; for entity facts&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mempalace_diary_write&lt;/code&gt; for end-of-session notes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mempalace_gain&lt;/code&gt; for local usage/value reporting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That means memory becomes part of the agent's normal tool loop, not a separate app I need to babysit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Value Points
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Less Repeated Context Stuffing
&lt;/h3&gt;

&lt;p&gt;A lot of agent work begins with pasting the same background again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;project goals&lt;/li&gt;
&lt;li&gt;architecture constraints&lt;/li&gt;
&lt;li&gt;coding preferences&lt;/li&gt;
&lt;li&gt;known broken paths&lt;/li&gt;
&lt;li&gt;previous debugging attempts&lt;/li&gt;
&lt;li&gt;"please follow these local rules"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That context costs tokens every time. More importantly, it costs attention.&lt;/p&gt;

&lt;p&gt;A memory MCP lets the agent retrieve the relevant piece instead of asking the user to paste the whole story.&lt;/p&gt;

&lt;p&gt;This does not eliminate context windows. It uses them better.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Less Rediscovery Time
&lt;/h3&gt;

&lt;p&gt;The biggest gain is often time.&lt;/p&gt;

&lt;p&gt;If an agent spends ten minutes re-reading files to rediscover a decision that was already made last week, that cost is invisible in a token bill but very visible in a workday.&lt;/p&gt;

&lt;p&gt;Memory helps with questions like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mempalace search &lt;span class="s2"&gt;"why did we choose the current migration approach"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or through MCP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Search memory for the previous discussion about auth token storage.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value is not just faster answers. It is fewer repeated loops.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Better Cross-Session Continuity
&lt;/h3&gt;

&lt;p&gt;Agents are good at local reasoning inside one session. They are worse at carrying a project's lived history across sessions.&lt;/p&gt;

&lt;p&gt;A memory diary changes that.&lt;/p&gt;

&lt;p&gt;At the end of substantive work, the agent can write a short durable note: what changed, what was learned, what still matters. The next agent can read those diary entries instead of starting cold.&lt;/p&gt;

&lt;p&gt;This is especially useful when switching between tools. I may start in Cursor, continue in Codex, and later ask Claude Code to inspect something. The memory is not trapped in one conversation.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Project Decisions Become Searchable
&lt;/h3&gt;

&lt;p&gt;Source code shows what exists. It does not always show why.&lt;/p&gt;

&lt;p&gt;A knowledge graph can store temporal facts like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Project A uses SQLite as of 2026-05-05"&lt;/li&gt;
&lt;li&gt;"Feature B was deferred because the public API was unstable"&lt;/li&gt;
&lt;li&gt;"User prefers conservative public API changes"&lt;/li&gt;
&lt;li&gt;"Migration strategy changed after release X"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The temporal part matters. Facts change. Memory needs invalidation, not just accumulation.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Local-First Privacy
&lt;/h3&gt;

&lt;p&gt;For many coding projects, the memory layer should be local by default.&lt;/p&gt;

&lt;p&gt;MemPalace keeps the database on disk and runs embeddings locally. That makes it suitable for project notes, private conversations, and internal decisions that you do not want to send to another service just to make them searchable.&lt;/p&gt;

&lt;p&gt;Local-first does not mean "never sync anything anywhere." It means the default memory substrate is yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Duplicate Detection
&lt;/h3&gt;

&lt;p&gt;A practical memory system has to avoid becoming a junk drawer.&lt;/p&gt;

&lt;p&gt;If the same file, transcript, or note gets indexed repeatedly, memory becomes noisy and wasteful. Duplicate detection helps skip content that is already stored.&lt;/p&gt;

&lt;p&gt;That matters for both quality and measurement: fewer repeated drawers, less re-indexing, less clutter for retrieval.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Measuring The Gain
&lt;/h3&gt;

&lt;p&gt;One thing I like about this approach is that the memory layer can measure its own usefulness.&lt;/p&gt;

&lt;p&gt;MemPalace has a &lt;code&gt;gain&lt;/code&gt; command and MCP tool that summarize local usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mempalace gain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can report things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tool calls&lt;/li&gt;
&lt;li&gt;search hit rate&lt;/li&gt;
&lt;li&gt;estimated tokens saved&lt;/li&gt;
&lt;li&gt;duplicate drawers skipped&lt;/li&gt;
&lt;li&gt;knowledge graph facts recalled&lt;/li&gt;
&lt;li&gt;diary recalls&lt;/li&gt;
&lt;li&gt;repeat questions avoided&lt;/li&gt;
&lt;li&gt;p95 latency&lt;/li&gt;
&lt;li&gt;top projects or memory wings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The token number is an estimate, not a universal truth. But even an estimate is useful because it turns "this feels helpful" into something you can inspect over time.&lt;/p&gt;

&lt;p&gt;A sample report might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MemPalace gain - last 30d (mempalace_rs)
  Tool calls         : 412   (sessions: 27)
  Hit rate           : 88%   (search hits 142/162)
  Tokens saved (est) : ~78,400
  Re-index skipped   : 31    (duplicate drawers avoided)
  KG facts recalled  : 56
  Diary recalls      : 8
  Repeat Qs avoided  : 19
  p95 latency        : 41 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The time value is harder to price, but more important. If memory avoids even a few repeated 10-minute rediscovery loops per week, the gain is larger than the token number suggests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieval Quality Matters
&lt;/h2&gt;

&lt;p&gt;Memory is only useful if retrieval works.&lt;/p&gt;

&lt;p&gt;In MemPalace's benchmark on the LongMemEval &lt;code&gt;s_cleaned&lt;/code&gt; split, retrieval was tested over conversational haystacks of roughly 50 sessions and about 115k tokens each.&lt;/p&gt;

&lt;p&gt;The documented session-level recall numbers are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;R@1: &lt;code&gt;0.889&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;R@5: &lt;code&gt;0.981&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;R@10: &lt;code&gt;0.991&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That means the right session appeared in the top 5 results for 461 of 470 evaluated questions.&lt;/p&gt;

&lt;p&gt;Those numbers are not claiming that every agent answer will be correct. They measure retrieval, not final generation. But they do show that a local retriever can make a large conversation history practically searchable without an LLM reranker, answer generator, or cloud embedding service.&lt;/p&gt;

&lt;p&gt;The weak spots are also useful to know. Preference-style questions are harder because "What is my favorite X?" may need to match a sentence like "I usually reach for Y." That is a different retrieval problem than matching explicit project facts.&lt;/p&gt;

&lt;p&gt;This is another reason I like measurement. It shows where memory helps and where the system still needs better signals.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Typical Workflow
&lt;/h2&gt;

&lt;p&gt;The workflow is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mempalace &lt;span class="nb"&gt;install
&lt;/span&gt;mempalace doctor
mempalace init ~/my-project
mempalace mine ~/my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then restart the agentic app so it loads the MCP config.&lt;/p&gt;

&lt;p&gt;From there, the agent can use memory through MCP, or you can query it directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mempalace search &lt;span class="s2"&gt;"how did we decide on the database schema"&lt;/span&gt;
mempalace gain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For conversation history, you can ingest exported transcripts. For project structure, you can mine files. For ongoing work, the agent can write diary entries after meaningful sessions.&lt;/p&gt;

&lt;p&gt;The pattern is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Store useful project and conversation context.&lt;/li&gt;
&lt;li&gt;Let the agent retrieve only what is relevant.&lt;/li&gt;
&lt;li&gt;Write down what changed after substantial work.&lt;/li&gt;
&lt;li&gt;Measure whether the memory is actually helping.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What This Is Not
&lt;/h2&gt;

&lt;p&gt;This is not a replacement for documentation.&lt;/p&gt;

&lt;p&gt;If something belongs in a README, architecture decision record, or public API doc, it should still go there.&lt;/p&gt;

&lt;p&gt;Local memory is for the layer below formal documentation: the working memory of a project. The half-decisions, preferences, prior attempts, debugging notes, and connective tissue that usually live only in chat history or someone's head.&lt;/p&gt;

&lt;p&gt;It is also not an excuse to trust retrieved context blindly. Agents still need to inspect current files, run tests, and verify assumptions. Memory should guide attention, not replace evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Gain
&lt;/h2&gt;

&lt;p&gt;The obvious value is token savings.&lt;/p&gt;

&lt;p&gt;Retrieving a few relevant drawers is cheaper than pasting thousands of tokens of background into every session. A local &lt;code&gt;gain&lt;/code&gt; report can estimate that.&lt;/p&gt;

&lt;p&gt;But the deeper value is time.&lt;/p&gt;

&lt;p&gt;Time not spent re-explaining.&lt;br&gt;
Time not spent searching old threads.&lt;br&gt;
Time not spent watching an agent rediscover the same failed path.&lt;br&gt;
Time not spent translating project history from human memory back into machine context.&lt;/p&gt;

&lt;p&gt;That is the part that compounds.&lt;/p&gt;

&lt;p&gt;A local memory MCP does not make an agent magically wise. It makes the working relationship less stateless.&lt;/p&gt;

&lt;p&gt;And for agentic coding tools, that may be one of the most practical upgrades available: not a smarter model, but a better memory of what already happened.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rust</category>
      <category>mcp</category>
      <category>productivity</category>
    </item>
    <item>
      <title>It's not about AI token costs. It's about prototyping.</title>
      <dc:creator>iCe Gaming</dc:creator>
      <pubDate>Sun, 29 Mar 2026 10:00:11 +0000</pubDate>
      <link>https://dev.to/icegaming/its-not-about-ai-token-costs-its-about-prototyping-47a1</link>
      <guid>https://dev.to/icegaming/its-not-about-ai-token-costs-its-about-prototyping-47a1</guid>
      <description>&lt;p&gt;It's not about the spending of AI tokens, it's about the potential of prototyping.&lt;/p&gt;

&lt;p&gt;I like to build things in my free time.&lt;/p&gt;

&lt;p&gt;Not necessarily products. Not necessarily monetization ideas. Just things I want to exist, things that benefit myself, or maybe others.&lt;/p&gt;

&lt;p&gt;And I use AI a lot for it.&lt;/p&gt;

&lt;p&gt;Because it's no longer about writing the best possible code upfront.&lt;br&gt;
It's about having a prototype ready, fast, in some kind of MVP state. Then iterating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building with AI + your own vision
&lt;/h2&gt;

&lt;p&gt;I recently redid my website for my weekend projects:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://icegaming.org/" rel="noopener noreferrer"&gt;iCeGaming.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have to say, when you combine your own visual idea with AI, it gets really close to what you actually had in mind.&lt;/p&gt;

&lt;p&gt;This is not a promotional post.&lt;br&gt;
It's more about showcasing how empowered we are now to just… build.&lt;/p&gt;

&lt;p&gt;Small note though:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Yes, humans are still accountable for the code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I don't expect AI to write production-ready systems. Not without iteration, validation, and actually understanding what’s going on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I’ve been building
&lt;/h2&gt;

&lt;p&gt;I’ve always had multiple projects going on. Games, tools, apps… always something upcoming.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎮 Games
&lt;/h2&gt;

&lt;p&gt;Main idea:&lt;/p&gt;

&lt;p&gt;playable in the browser&lt;br&gt;
no login&lt;br&gt;
no tracking&lt;br&gt;
just open and play&lt;/p&gt;

&lt;p&gt;I care more about the experience than anything else.&lt;/p&gt;

&lt;p&gt;I started with Warlocks, inspired by the Warcraft 3 days.&lt;br&gt;
Pure chaos: pushing, dodging fireballs, shrinking safe zone.&lt;/p&gt;

&lt;p&gt;Once I hit stable 60 FPS, I kept pushing:&lt;/p&gt;

&lt;p&gt;bigger maps&lt;br&gt;
more players&lt;br&gt;
more interaction&lt;/p&gt;

&lt;p&gt;Then came something inspired by &lt;code&gt;Pudge Wars&lt;/code&gt;-style gameplay:&lt;/p&gt;

&lt;p&gt;Mortar Mayhem&lt;br&gt;
16 players, 8v8, blind mortar shots across the map, fog-of-war feeling, upgrades based on performance.&lt;/p&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;p&gt;Pirate Ships deathmatch, 9 players, real-time aiming and prediction&lt;br&gt;
Tank Blitz, same idea, but with powerups, turret alignment, charged shots affecting accuracy&lt;/p&gt;

&lt;p&gt;At some point it became a pattern:&lt;/p&gt;

&lt;p&gt;Boats. Tanks. Submarines. Planes. Bicycles.&lt;br&gt;
Characters with bows. Pistols on horses. Whatever.&lt;/p&gt;

&lt;p&gt;The constraint is always the same:&lt;/p&gt;

&lt;p&gt;60 FPS in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  🛠️ Tools
&lt;/h2&gt;

&lt;p&gt;These usually come from real needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;llm-schema-guard&lt;/strong&gt;:&lt;br&gt;
Strict schema validation + enforcing correct shapes + observability&lt;br&gt;
&lt;strong&gt;commerce-orchestrator-api&lt;/strong&gt;:&lt;br&gt;
Moving towards agentic commerce, a layer in front of backend systems so agents don’t integrate directly with everything&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apex-Edge&lt;/strong&gt;:&lt;br&gt;
One problem I’ve seen everywhere:&lt;br&gt;
What happens when the internet goes down? Or AWS/GCP?&lt;br&gt;
Retail just… stops.&lt;br&gt;
Idea:&lt;br&gt;
local hub per store or region&lt;br&gt;
process transactions locally&lt;br&gt;
sync later&lt;br&gt;
don’t push all complexity into POS devices&lt;/p&gt;

&lt;h2&gt;
  
  
  📱 Apps
&lt;/h2&gt;

&lt;p&gt;Sometimes it’s just solving annoyances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;the-fuse&lt;/strong&gt;&lt;br&gt;
I was streaming and didn’t always have people to play with → so I built something to match creators for collaborations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;what-i-paid&lt;/strong&gt;&lt;br&gt;
I got tired of not tracking prices across stores&lt;br&gt;
→ take a picture of a receipt&lt;br&gt;
→ AI extracts everything&lt;br&gt;
→ track, manage, share&lt;br&gt;
Free, simple, low friction.&lt;/p&gt;

&lt;p&gt;And a lot more…&lt;/p&gt;

&lt;p&gt;There are a lot of other ideas in progress.&lt;/p&gt;

&lt;p&gt;Some go more into AI:&lt;/p&gt;

&lt;p&gt;local assistants&lt;br&gt;
multi-device control&lt;br&gt;
something like a lightweight “brain” coordinating things&lt;/p&gt;

&lt;p&gt;Some go bigger into games.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Adapt to AI and iterate fast.&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;Prototyping is cheap now.&lt;/p&gt;

&lt;p&gt;You don’t need to sit on ideas for weeks anymore. You can build something in hours or days, see if it works, and move on or improve it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Just don’t forget:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;If you ship it, you own it.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;AI doesn’t change that.&lt;br&gt;
(Quick note: I only linked the hub page because this isn’t a promo post. I just wanted to share the mindset and the joy of building fast with AI. The more we all build and iterate, the better it gets for everyone.)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>gamedev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building an Offline-First Retail Hub in Rust: How ApexEdge Keeps Stores Selling When the Internet Dies</title>
      <dc:creator>iCe Gaming</dc:creator>
      <pubDate>Mon, 16 Mar 2026 13:20:22 +0000</pubDate>
      <link>https://dev.to/icegaming/building-an-offline-first-retail-hub-in-rust-how-apexedge-keeps-stores-selling-when-the-internet-ipg</link>
      <guid>https://dev.to/icegaming/building-an-offline-first-retail-hub-in-rust-how-apexedge-keeps-stores-selling-when-the-internet-ipg</guid>
      <description>&lt;p&gt;If you’ve ever built retail software, you know the happy-path demo is the easy part.&lt;/p&gt;

&lt;p&gt;The hard part is everything around it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;internet goes down,&lt;/li&gt;
&lt;li&gt;HQ APIs lag or fail,&lt;/li&gt;
&lt;li&gt;terminals still need to sell,&lt;/li&gt;
&lt;li&gt;receipts still need to print,&lt;/li&gt;
&lt;li&gt;and nothing can be lost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built &lt;strong&gt;ApexEdge&lt;/strong&gt;, a RUST-powered store hub orchestrator that sits between POS/mPOS clients and HQ systems:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;POS/MPOS &amp;lt;-&amp;gt; ApexEdge &amp;lt;-&amp;gt; HQ&lt;/strong&gt;&lt;br&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%2Fgdmw9iyd030m0heq3urb.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%2Fgdmw9iyd030m0heq3urb.png" alt=" " width="800" height="242"&gt;&lt;/a&gt;&lt;br&gt;
Repo: &lt;a href="https://github.com/AncientiCe/apex-edge" rel="noopener noreferrer"&gt;https://github.com/AncientiCe/apex-edge&lt;/a&gt;&lt;br&gt;
This post is about the &lt;em&gt;actual engineering problems&lt;/em&gt; I had to solve, and the architecture patterns that made the system reliable in production-like conditions.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Core Constraint: Stores Must Keep Selling
&lt;/h2&gt;

&lt;p&gt;Retail can’t block on cloud availability. That drove my first principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The store hub is the source of operational truth during a transaction.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In practice, that means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;local persistence for catalog/prices/promos/customers/config,&lt;/li&gt;
&lt;li&gt;local cart + checkout orchestration,&lt;/li&gt;
&lt;li&gt;local document generation (receipt, merchant copy, kitchen chit, etc.),&lt;/li&gt;
&lt;li&gt;async sync with HQ, not inline dependency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If HQ is unavailable, checkout should still complete locally.&lt;br&gt;&lt;br&gt;
Synchronization is eventually consistent, but sales flow is immediate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why a Hub Instead of POS Calling HQ Directly?
&lt;/h2&gt;

&lt;p&gt;Direct POS -&amp;gt; HQ can work for tiny setups, but at scale it creates fragile coupling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every terminal becomes an integration client,&lt;/li&gt;
&lt;li&gt;token/session handling is duplicated per app/device,&lt;/li&gt;
&lt;li&gt;every command depends on WAN quality,&lt;/li&gt;
&lt;li&gt;retries/idempotency become inconsistent across clients.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hub model centralizes this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one northbound contract for POS commands,&lt;/li&gt;
&lt;li&gt;one southbound contract for HQ submission/sync,&lt;/li&gt;
&lt;li&gt;one place to enforce idempotency, retries, conflict handling, and observability.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Contract-Driven Commands Instead of “Random Endpoints”
&lt;/h2&gt;

&lt;p&gt;Instead of exposing many ad-hoc mutable endpoints, I route checkout behavior through a command envelope:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;POST /pos/command&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;create_cart&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;add_line_item&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set_customer&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set_tendering&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;add_payment&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;finalize_order&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This gave me major wins:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Compatibility discipline&lt;/strong&gt;: versioned command envelope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idempotency at the boundary&lt;/strong&gt;: safe retries from POS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified observability&lt;/strong&gt;: command metrics by operation/outcome.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic testing&lt;/strong&gt;: journey tests mirror real checkout flows.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Problem #1: “Exactly Once” Is a Lie (So I Designed for At-Least-Once)
&lt;/h2&gt;

&lt;p&gt;Networks duplicate requests. Clients retry. Humans double-click.&lt;/p&gt;

&lt;p&gt;So I assume at-least-once delivery and make handlers idempotent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;command envelope includes &lt;code&gt;idempotency_key&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;server stores command results keyed by scope,&lt;/li&gt;
&lt;li&gt;repeated command with same key returns same logical response.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This prevents duplicate line items, duplicate payments, and duplicate order submission side effects.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem #2: Reliable HQ Submission Without Blocking Checkout
&lt;/h2&gt;

&lt;p&gt;Inline &lt;code&gt;finalize -&amp;gt; call HQ&lt;/code&gt; is brittle. If HQ times out, do you fail the sale?&lt;/p&gt;

&lt;p&gt;I don’t.&lt;/p&gt;

&lt;p&gt;I use a &lt;strong&gt;durable outbox&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;finalize order locally,&lt;/li&gt;
&lt;li&gt;atomically write HQ submission payload into outbox table,&lt;/li&gt;
&lt;li&gt;background dispatcher posts to HQ with retry/backoff,&lt;/li&gt;
&lt;li&gt;mark accepted/retry/dead-letter based on result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This separates customer-facing latency from external dependency reliability.&lt;/p&gt;

&lt;p&gt;Operationally, this is huge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cashiers are not blocked by HQ instability,&lt;/li&gt;
&lt;li&gt;submissions are durable across process restarts,&lt;/li&gt;
&lt;li&gt;dead-letter rows are inspectable and replayable.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Problem #3: Keeping Catalog/Pricing Fresh Without Breaking Ongoing Sales
&lt;/h2&gt;

&lt;p&gt;HQ sync is asynchronous NDJSON ingest with checkpoints per entity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;catalog&lt;/li&gt;
&lt;li&gt;categories&lt;/li&gt;
&lt;li&gt;price book&lt;/li&gt;
&lt;li&gt;tax rules&lt;/li&gt;
&lt;li&gt;promotions&lt;/li&gt;
&lt;li&gt;customers&lt;/li&gt;
&lt;li&gt;coupons&lt;/li&gt;
&lt;li&gt;inventory&lt;/li&gt;
&lt;li&gt;print templates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Design goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ingest in batches,&lt;/li&gt;
&lt;li&gt;move checkpoints only on successful entity application,&lt;/li&gt;
&lt;li&gt;tolerate unknown entities for forward compatibility,&lt;/li&gt;
&lt;li&gt;surface sync state via API for UI visibility.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This avoids all-or-nothing fragility and makes partial progress explicit.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem #4: Inventory Truth vs. Checkout Experience
&lt;/h2&gt;

&lt;p&gt;Stock rules are trickier than “if qty &amp;gt; 0”.&lt;/p&gt;

&lt;p&gt;I enforce availability at add-to-cart time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;inactive items are blocked,&lt;/li&gt;
&lt;li&gt;out-of-stock items are blocked,&lt;/li&gt;
&lt;li&gt;quantity checks can return insufficient stock errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I also handle incomplete sync states pragmatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;if inventory is not yet synced for an item, I allow add-to-cart (configurable policy at architecture level).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That tradeoff favors operational continuity while still applying strict checks where data exists.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem #5: Document Generation Should Be Local and Deterministic
&lt;/h2&gt;

&lt;p&gt;Receipts are not optional, and they can’t depend on round-tripping to HQ.&lt;/p&gt;

&lt;p&gt;I generate documents in the hub:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;render from synced templates + order/cart view models,&lt;/li&gt;
&lt;li&gt;persist document artifacts,&lt;/li&gt;
&lt;li&gt;expose retrieval endpoints for POS clients.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;POS remains responsible for printer/device UX, but generation is centralized and reproducible.&lt;/p&gt;

&lt;p&gt;Bonus: template updates can be distributed through sync instead of app redeploys.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem #6: Security for Shared, Real-World Devices
&lt;/h2&gt;

&lt;p&gt;mPOS fleets need practical trust bootstrap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;generate pairing codes,&lt;/li&gt;
&lt;li&gt;pair device once,&lt;/li&gt;
&lt;li&gt;exchange external identity token + device proof,&lt;/li&gt;
&lt;li&gt;receive local hub access/refresh tokens,&lt;/li&gt;
&lt;li&gt;protect operational routes behind hub auth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This model gives controlled device onboarding without hardcoding secrets into POS binaries.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problem #7: You Can’t Operate What You Can’t See
&lt;/h2&gt;

&lt;p&gt;I instrumented behavior ownership across routes and background flows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;command counts + latencies + outcomes,&lt;/li&gt;
&lt;li&gt;outbox dispatch attempts/duration/DLQ,&lt;/li&gt;
&lt;li&gt;sync ingest batches + durations + outcomes,&lt;/li&gt;
&lt;li&gt;DB operation outcomes,&lt;/li&gt;
&lt;li&gt;HTTP-level request metrics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In an outage, these metrics answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;is checkout still flowing?&lt;/li&gt;
&lt;li&gt;are HQ submissions backlogged?&lt;/li&gt;
&lt;li&gt;is sync stuck on a specific entity?&lt;/li&gt;
&lt;li&gt;are failures concentrated at DB, network, or domain validation?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this, “it feels slow” becomes your only signal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Testing Strategy That Actually Catches Regressions
&lt;/h2&gt;

&lt;p&gt;I leaned hard on behavior-level tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;in-process smoke tests for health/ready/basic command flows,&lt;/li&gt;
&lt;li&gt;full journey tests from cart creation to finalized order + document generation + outbox payload assertions,&lt;/li&gt;
&lt;li&gt;crate-level tests for domain, storage, sync, outbox, printing, and contracts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matters because distributed correctness is mostly integration correctness.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture Pattern Summary
&lt;/h2&gt;

&lt;p&gt;What worked for me:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Local-first transaction boundary&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Command envelope + idempotency&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Durable outbox for external submission&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Checkpointed async ingest for HQ sync&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local document generation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Device trust + token exchange&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;First-class metrics on all critical paths&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you’re building store, warehouse, or edge-heavy systems, this combination gives resilience without requiring “perfect network” fantasies.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tradeoffs (No Silver Bullets)
&lt;/h2&gt;

&lt;p&gt;What you pay for this architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;more moving parts than direct API calls,&lt;/li&gt;
&lt;li&gt;stronger schema/contract discipline required,&lt;/li&gt;
&lt;li&gt;eventual consistency complexity,&lt;/li&gt;
&lt;li&gt;operational tooling for DLQ replay and sync introspection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still worth it for domains where downtime equals lost revenue.&lt;/p&gt;




&lt;h2&gt;
  
  
  Practical Advice If You’re Starting Today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Start with idempotency keys on day one.&lt;/li&gt;
&lt;li&gt;Model outbox as a product feature, not a reliability patch.&lt;/li&gt;
&lt;li&gt;Keep sync entity-specific with independent checkpoints.&lt;/li&gt;
&lt;li&gt;Treat metrics as acceptance criteria.&lt;/li&gt;
&lt;li&gt;Run end-to-end journey tests before adding more endpoints.&lt;/li&gt;
&lt;li&gt;Document behavior ownership explicitly (who owns which route/flow/metric).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The biggest shift for me was this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I stopped optimizing for request/response elegance and started optimizing for business continuity under failure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That changes everything from API shape to data model to test strategy.&lt;/p&gt;

&lt;p&gt;If you’re designing offline-capable systems and want to compare patterns, I’m happy to share a deeper follow-up on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;idempotency schema design,&lt;/li&gt;
&lt;li&gt;outbox retry and DLQ policy,&lt;/li&gt;
&lt;li&gt;sync conflict handling,&lt;/li&gt;
&lt;li&gt;or observability dashboards that worked in practice.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rust</category>
      <category>architecture</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building an AI Commerce Orchestrator in Rust</title>
      <dc:creator>iCe Gaming</dc:creator>
      <pubDate>Fri, 13 Mar 2026 13:41:44 +0000</pubDate>
      <link>https://dev.to/icegaming/building-an-ai-commerce-orchestrator-in-rust-44pd</link>
      <guid>https://dev.to/icegaming/building-an-ai-commerce-orchestrator-in-rust-44pd</guid>
      <description>&lt;p&gt;Protocols and patterns are emerging that let &lt;strong&gt;AI agents interact with commerce systems&lt;/strong&gt; - product search, checkout flows, inventory, order management. For that to work reliably we need &lt;strong&gt;middleware that orchestrates complex interactions&lt;/strong&gt; between AI systems and traditional commerce APIs.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://github.com/AncientiCe/commerce-orchestrator" rel="noopener noreferrer"&gt;commerce-orchestrator&lt;/a&gt;&lt;/strong&gt; for that role: an open-source Rust project that sits between &lt;strong&gt;AI agents (or any client) and commerce backends&lt;/strong&gt; as a deterministic orchestration layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Modern commerce stacks are complex. Simple user actions often require coordination across catalog, inventory, pricing, payment, and order systems. When an &lt;strong&gt;AI agent&lt;/strong&gt; tries to perform the same flow - discover products, check availability, compare pricing, initiate checkout, confirm order - we hit a mismatch: &lt;strong&gt;AI systems are stateless and probabilistic; commerce systems need deterministic, transactional flows.&lt;/strong&gt; Without an orchestration layer you get inconsistent state, duplicated requests, partial transactions, unreliable retries, and security risks. An &lt;strong&gt;orchestrator&lt;/strong&gt; in the middle is what makes agent-driven commerce safe.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Project Does Today
&lt;/h2&gt;

&lt;p&gt;The Commerce Orchestrator is &lt;strong&gt;middleware&lt;/strong&gt;: clients call its REST (and A2A) API; the service runs deterministic cart and checkout flows and delegates to your catalog, pricing, tax, geo, payment, and receipt backends via configurable HTTP adapters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implemented today:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cart and checkout&lt;/strong&gt; - Create cart, add/update/remove items, apply adjustments, start checkout, execute checkout with &lt;strong&gt;idempotency&lt;/strong&gt; and in-flight deduplication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment lifecycle&lt;/strong&gt; - Capture, void, and refund over the facade and HTTP API; tenant-scoped and auth-protected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability&lt;/strong&gt; - Outbox, inbox, and dead-letter primitives; operational endpoints to process outbox, list/replay dead-letter, and run &lt;strong&gt;reconciliation&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth and multi-tenancy&lt;/strong&gt; - Bearer token auth, tenant and scope checks; idempotency and state scoped by tenant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability&lt;/strong&gt; - Request IDs, tracing, a metrics endpoint; health probes for liveness and readiness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery&lt;/strong&gt; - &lt;code&gt;GET /.well-known/ucp&lt;/code&gt; returns a capability manifest (UCP-style) with version and &lt;code&gt;rest_endpoint&lt;/code&gt;; advertised capabilities map to implemented routes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A2A&lt;/strong&gt; - &lt;code&gt;POST /api/v1/a2a/checkout&lt;/code&gt; and &lt;code&gt;POST /api/v1/a2a/cart&lt;/code&gt; accept envelope payloads; requests are normalized to the same domain types and policy as REST.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Rust
&lt;/h2&gt;

&lt;p&gt;Rust was chosen for &lt;strong&gt;performance&lt;/strong&gt; (high request volume with minimal runtime overhead), &lt;strong&gt;reliability&lt;/strong&gt; (ownership model to avoid memory leaks and concurrency bugs in transactional workflows), and a strong &lt;strong&gt;async ecosystem&lt;/strong&gt; for high-throughput APIs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;The codebase is a Cargo workspace of crates. Request flow looks like this:&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.amazonaws.com%2Fuploads%2Farticles%2Fff1vjpjbx02jmg9p19ip.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%2Fff1vjpjbx02jmg9p19ip.png" alt="Mermaid orchestrator schema" width="800" height="709"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;orchestrator-http&lt;/strong&gt; - Axum server, routes, auth, request ID, tracing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;orchestrator-api&lt;/strong&gt; - Stable facade: cart commands, checkout execute, payment lifecycle, incoming events, outbox/dead-letter/reconciliation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;orchestrator-runtime&lt;/strong&gt; - Durable execution runner, idempotency, retries, timeout handling, persistence traits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;provider-contracts&lt;/strong&gt; - Trait interfaces for catalog, pricing, tax, geo, payment, receipt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;integration-adapters&lt;/strong&gt; - HTTP clients that implement those traits (configurable base URLs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;orchestrator-core&lt;/strong&gt; - Domain model, state machine, validation, policy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;orchestrator-observability&lt;/strong&gt; - Tracing, metrics helpers, audit event schemas.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Persistence is file-backed (event store, idempotency, outbox, inbox, dead-letter); restart-recovery tests validate that the same idempotency key returns the same outcome after process restart.&lt;/p&gt;




&lt;h2&gt;
  
  
  API Surface (What’s Actually There)
&lt;/h2&gt;

&lt;p&gt;All under &lt;code&gt;/api/v1&lt;/code&gt; unless noted. Auth: in production, Bearer token required.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Endpoints&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cart &amp;amp; checkout&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;POST /api/v1/cart/commands&lt;/code&gt;, &lt;code&gt;POST /api/v1/checkout/execute&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A2A&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;POST /api/v1/a2a/checkout&lt;/code&gt;, &lt;code&gt;POST /api/v1/a2a/cart&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payments&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;POST /api/v1/payments/capture&lt;/code&gt;, &lt;code&gt;POST /api/v1/payments/void&lt;/code&gt;, &lt;code&gt;POST /api/v1/payments/refund&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Events&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;POST /api/v1/events/incoming&lt;/code&gt; (idempotent accept-once)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operations&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;POST /api/v1/ops/outbox/process&lt;/code&gt;, &lt;code&gt;GET /api/v1/ops/dead-letter&lt;/code&gt;, &lt;code&gt;POST /api/v1/ops/dead-letter/replay&lt;/code&gt;, &lt;code&gt;POST /api/v1/ops/reconciliation&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Discovery&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;GET /.well-known/ucp&lt;/code&gt; (no auth)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Health&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;GET /health/live&lt;/code&gt;, &lt;code&gt;GET /health/ready&lt;/code&gt;, &lt;code&gt;GET /metrics&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Checkout requests include &lt;code&gt;tenant_id&lt;/code&gt;, &lt;code&gt;merchant_id&lt;/code&gt;, &lt;code&gt;cart_id&lt;/code&gt;, &lt;code&gt;cart_version&lt;/code&gt;, &lt;code&gt;idempotency_key&lt;/code&gt;, and optional payment-intent fields (e.g. &lt;code&gt;payment_handler_id&lt;/code&gt;, &lt;code&gt;ap2_consent_proof&lt;/code&gt;). With &lt;code&gt;AP2_STRICT=1&lt;/code&gt;, checkout validates a structured consent proof (issuer, signature, expiry, payment handler binding) before execution.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reliability in Practice
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Idempotency&lt;/strong&gt; - Checkout and payment lifecycle use idempotency keys; duplicate keys get in-flight deduplication or cached result; state is persisted so restart doesn’t break idempotent semantics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbox&lt;/strong&gt; - Effects can be enqueued and processed via &lt;code&gt;process_outbox_once(max_attempts)&lt;/code&gt;; configurable retries with backoff in the adapter client; after max attempts, messages move to dead-letter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dead-letter&lt;/strong&gt; - List and replay via HTTP; replay re-enqueues for another attempt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incoming events&lt;/strong&gt; - &lt;code&gt;accept_incoming_event_once(message_id)&lt;/code&gt; deduplicates webhook-style events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reconciliation&lt;/strong&gt; - &lt;code&gt;run_reconciliation(transaction_ids)&lt;/code&gt; compares orchestrator payment state with provider state (when the provider implements &lt;code&gt;get_payment_state&lt;/code&gt;) and reports mismatches.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Outbox processing is &lt;strong&gt;triggered by you&lt;/strong&gt; (e.g. timer or worker calling the ops endpoint); there is no built-in scheduler in the repo.&lt;/p&gt;




&lt;h2&gt;
  
  
  Implemented vs Deferred (No Spin)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Implemented&lt;/th&gt;
&lt;th&gt;Deferred / optional&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Discovery &lt;code&gt;/.well-known/ucp&lt;/code&gt;, capability manifest, rest_endpoint&lt;/td&gt;
&lt;td&gt;MCP tool mapping (optional; tests “when added”)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A2A envelope normalization for checkout and cart&lt;/td&gt;
&lt;td&gt;AP2 replay protection for mandates (deferred)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cart commands, checkout execute, payment capture/void/refund&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Idempotency + in-flight dedupe; file-backed persistence&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Outbox, inbox, dead-letter, list/replay, reconciliation&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bearer auth, tenant isolation, production config (PUBLIC_BASE_URL, etc.)&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AP2 payment intent fields; AP2 strict consent proof validation&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Request IDs, tracing, metrics, health probes&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Known limitations (from the repo):&lt;/strong&gt; File-backed persistence is directory-based JSON and is &lt;strong&gt;not suitable for high concurrency&lt;/strong&gt; without external locking or shared-write storage. Default Kubernetes manifests assume a single replica for this reason. AP2 replay protection (mandate/nonce deduplication) is explicitly deferred.&lt;/p&gt;




&lt;h2&gt;
  
  
  Current Status and Next Steps
&lt;/h2&gt;

&lt;p&gt;The project is in active development. The core is there: Rust API, orchestration layer, pluggable adapters, async workflows, and the reliability and observability pieces above. Possible next steps: more agent-oriented API shapes, a declarative workflow DSL, stronger observability (e.g. structured audit events), and additional pluggable adapters. MCP mapping and full AP2 replay protection are on the backlog as optional/deferred.&lt;/p&gt;




&lt;h2&gt;
  
  
  Open Source
&lt;/h2&gt;

&lt;p&gt;The project is available at:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/AncientiCe/commerce-orchestrator" rel="noopener noreferrer"&gt;https://github.com/AncientiCe/commerce-orchestrator&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you’re exploring AI-driven commerce, agent automation, or orchestration middleware in Rust, I’d welcome feedback - especially on &lt;strong&gt;adapter design&lt;/strong&gt;, &lt;strong&gt;workflow ergonomics&lt;/strong&gt;, or &lt;strong&gt;observability&lt;/strong&gt;. This repo is one concrete take on &lt;strong&gt;AI-safe commerce infrastructure&lt;/strong&gt; you can run and extend today.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Summary: This post describes only what the repository implements today. Implemented vs deferred and known limitations are taken from the codebase, the conformance matrix, and the changelog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>ai</category>
      <category>api</category>
      <category>opensource</category>
    </item>
    <item>
      <title>One Saturday, One AI-Powered Pirate Ship Battle Game, Built in ~7 Hours</title>
      <dc:creator>iCe Gaming</dc:creator>
      <pubDate>Fri, 13 Mar 2026 12:43:13 +0000</pubDate>
      <link>https://dev.to/icegaming/one-saturday-one-ai-powered-pirate-ship-battle-game-built-in-7-hours-26kp</link>
      <guid>https://dev.to/icegaming/one-saturday-one-ai-powered-pirate-ship-battle-game-built-in-7-hours-26kp</guid>
      <description>&lt;p&gt;How did you spend your Saturday?  &lt;/p&gt;

&lt;p&gt;Following up on those weekend vibe-coding sessions where AI turns prototyping into actual fun (indie game MVPs at warp speed)...&lt;/p&gt;

&lt;p&gt;I randomly thought about a super simple ship battle game, tiny pirate ships, one cannon each. Nothing AAA, just basic fun. (There was some old game like this that got buried on IGDB, but whatever.)&lt;/p&gt;

&lt;p&gt;Challenge: how fast can I actually get this playable?&lt;/p&gt;

&lt;p&gt;Started at 1:21 PM with a Lovable prompt.&lt;br&gt;&lt;br&gt;
By 8:45 pm I was texting my wife: "Done + "&lt;/p&gt;

&lt;p&gt;Total ~7 hours, including a 2-hour shopping trip + dinner break.&lt;/p&gt;

&lt;p&gt;Journey went like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frontend &amp;amp; basics (~2 hours)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Used Lovable because credits were there, not married to it over Claude or anything, just whatever gets the job done fast. (People ask why not X tool; honestly doesn't matter as long as you ship.)&lt;/p&gt;

&lt;p&gt;In ~2 hours: proper ship maneuvers, shooting, game menu, health bars, the works. All browser-based. Synced to GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend &amp;amp; multiplayer magic (the painful but rewarding part)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Pulled locally, opened in Cursor.&lt;br&gt;&lt;br&gt;
Asked it to plan an authoritative server: matchmaking queues, bot fills, WS everything. One requirement: RUST.&lt;/p&gt;

&lt;p&gt;It went... ambitious. Generated Rust backend (very necessary for my tiny $6 DO droplet, low resources, fast, safe).&lt;/p&gt;

&lt;p&gt;Struggles were real:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stutter movements, flickering env
&lt;/li&gt;
&lt;li&gt;WS connectivity flakes
&lt;/li&gt;
&lt;li&gt;Message contracts all over the place
&lt;/li&gt;
&lt;li&gt;FIFO queue ordering headaches
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Had to jump in a few times, mostly because I know where these things usually blow up (frontend fighting backend state updates = constant re-renders). Tweaked to make backend single source of truth, frontend just renders/interpolates. Way smoother now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment (reusing my template)&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Techy spoiler, skip if you don't care&lt;/p&gt;

&lt;p&gt;$6 DigitalOcean droplet + free Cloudflare Pages, classic combo.&lt;/p&gt;

&lt;p&gt;Frontend: test+lint → build → Cloudflare deploy  &lt;/p&gt;

&lt;p&gt;Backend (Rust):  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cargo test + clippy + audit + fmt
&lt;/li&gt;
&lt;li&gt;build release
&lt;/li&gt;
&lt;li&gt;rsync to droplet
&lt;/li&gt;
&lt;li&gt;update systemd unit
&lt;/li&gt;
&lt;li&gt;nginx config tweaks
&lt;/li&gt;
&lt;li&gt;pull fresh certs for API
&lt;/li&gt;
&lt;li&gt;healthcheck
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One command, live.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;End result&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
9-player browser lobby, 60 fps, ships sailing, cannons booming, health dropping, syncs across without major drama.&lt;/p&gt;

&lt;p&gt;All in one Saturday.&lt;/p&gt;

&lt;p&gt;This isn't really about showing off the game (but if you're curious for research or just want to play around, here's the live link: &lt;strong&gt;&lt;a href="https://sea-mayhem.icegaming.org/" rel="noopener noreferrer"&gt;https://sea-mayhem.icegaming.org/&lt;/a&gt;&lt;/strong&gt; ).&lt;br&gt;&lt;br&gt;
&lt;em&gt;Disclaimer: prototype, expect bugs, desktop only!&lt;/em&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.amazonaws.com%2Fuploads%2Farticles%2Fx65od94yu67v7wkrsx09.gif" 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%2Fx65od94yu67v7wkrsx09.gif" alt=" " width="600" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's about how these weekend experiments keep getting faster and more rewarding with AI tools. Prototyping used to drag; now it's pure fun and you actually finish things.&lt;/p&gt;

&lt;p&gt;What about you guys? Built anything silly-fun with AI on a weekend lately? How quick are your MVPs getting these days? Drop stories below, always love hearing them. 🏴‍☠️&lt;/p&gt;

</description>
      <category>rust</category>
      <category>gamedev</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🧙‍♂️ Warlocks: Weekend Journeys</title>
      <dc:creator>iCe Gaming</dc:creator>
      <pubDate>Mon, 19 May 2025 17:01:08 +0000</pubDate>
      <link>https://dev.to/icegaming/warlocks-weekend-journeys-5fe2</link>
      <guid>https://dev.to/icegaming/warlocks-weekend-journeys-5fe2</guid>
      <description>&lt;p&gt;🧙‍♂️ Warlocks: Weekend Journeys&lt;/p&gt;

&lt;p&gt;What started as a weekend browser experiment turned into a fully functional multiplayer game — and a deep dive into performance, sync, and game architecture.&lt;/p&gt;

&lt;p&gt;🎯 Phase 1 – Prototype&lt;/p&gt;

&lt;p&gt;Movement and fireballs were handled entirely client-side.Sync was "best effort" — enough to demo, but chaotic under pressure.&lt;/p&gt;

&lt;p&gt;🔥 Phase 2 – Load Testing Reality Check&lt;/p&gt;

&lt;p&gt;The Node.js backend capped out at ~300 players.Sync issues, message storms, and heavy desync.Started rewriting the backend in Rust.&lt;/p&gt;

&lt;p&gt;🧱 Phase 3 – Rust Rewrite + Server Authority&lt;/p&gt;

&lt;p&gt;Moved the entire game loop to Rust.Fireball collisions, HP, knockback — all centralized.Clients only send inputs; the server owns the world state.Stress-tested up to 3,000 concurrent players with 0 visible lag.&lt;/p&gt;

&lt;p&gt;⚔️ Phase 4 – Cleanup &amp;amp; Core Mechanics&lt;/p&gt;

&lt;p&gt;Fixed movement prediction &amp;amp; "infinite knockback" bugs&lt;/p&gt;

&lt;p&gt;Added fireball cooldowns + visual indicators&lt;/p&gt;

&lt;p&gt;Health bars, player names, 8-player custom lobbies&lt;/p&gt;

&lt;p&gt;Implemented win conditions and match lifecycle&lt;/p&gt;

&lt;p&gt;🕹️ Phase 5 – Real Game&lt;/p&gt;

&lt;p&gt;You can now play a full match, win, return to the menu, and rejoin.Everything is synced. Everything just works.All in the browser.&lt;/p&gt;

&lt;p&gt;🏗️ Next Step – Standalone Game&lt;/p&gt;

&lt;p&gt;Currently building a native Bevy (Rust) version.What I enjoy most is learning through building!&lt;/p&gt;

&lt;p&gt;👉 Play the browser version here: &lt;a href="https://warlockjs.pages.dev(You" rel="noopener noreferrer"&gt;https://warlockjs.pages.dev(You&lt;/a&gt; might not find an opponent since this is a share, but feel free to open a second tab to try it out.)&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>rust</category>
      <category>indiegames</category>
      <category>websockets</category>
    </item>
  </channel>
</rss>
