<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ranadeep Tujala on Medium]]></title>
        <description><![CDATA[Stories by Ranadeep Tujala on Medium]]></description>
        <link>https://medium.com/@ranadeep.1226?source=rss-bb962f1add15------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*coSya03xO2TTEAhLy9b2fQ.png</url>
            <title>Stories by Ranadeep Tujala on Medium</title>
            <link>https://medium.com/@ranadeep.1226?source=rss-bb962f1add15------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:18:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ranadeep.1226/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Powerful RAG with LangGraph and MCP for Player Queries]]></title>
            <link>https://medium.com/@ranadeep.1226/togaf-adm-ai-lang-graph-rag-for-player-queries-1637bfe55d56?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/1637bfe55d56</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[adm]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[togaf]]></category>
            <category><![CDATA[langgraph]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 04:03:13 GMT</pubDate>
            <atom:updated>2026-09-22T07:02:46.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QiZYofaIojeDtmAx.jpg" /></figure><h4>Enterprise Architecture for a multi-source investigation assistant — back office, Grafana logs, and transaction summaries</h4><p>Support, fraud ops, and back office do not ask questions in SQL.</p><p>They ask: “Player had a failed withdrawal after a win — what happened?”</p><p>That answer lives in three places at once: a transaction summary in the database, error and payment logs in Grafana, and account flags in back office.</p><p>Before we built anything, the workflow was three tabs, three teams, twenty minutes — and sometimes a wrong conclusion because nobody stitched the timeline together.</p><p>This article maps how we designed a player investigation assistant using LangGraph (orchestration), MCP (tool boundaries to enterprise systems), and RAG (context, not truth) — through Enterprise Architecture and the Architecture Development Method (ADM).</p><p>It is not a tutorial on “hello world RAG.” It is how an EA team decides what the model may know, what it must prove via tools, and what must never leave your boundary.</p><h3>Why this is an EA problem, not a “chatbot” project</h3><p>Most LLM demos collapse three different concerns into one prompt:</p><p>If you let the model invent facts, you fail audit.</p><p>If you force analysts to write joins across Grafana and OLTP, you fail operations.</p><p>If you embed live transactions in a vector DB, you fail security and freshness.</p><p>Enterprise Architecture’s job here is to draw the seams: orchestration, tools, retrieval, governance — before anyone picks a model vendor.</p><h4>ADM in one sentence (before we use it)</h4><p>ADM moves from <em>“why are we changing?</em> to <em>“what must be true in business, data, applications, and technology?”</em> to <em>“how do we deliver and govern?”</em></p><p>For a player-query assistant, the phases below are the ones that mattered. You do not need every TOGAF artifact. You need every phase question answered well enough to decide.</p><h4>Preliminary Phase — principles before prompts</h4><p>ADM question:What rules does this capability obey, regardless of model?</p><p>We fixed these up front:</p><p>Facts from tools, not from embeddings — balances, txn states, and log lines come from MCP tools with audit trails.</p><p>Read-only by default — no assistant-driven writes to wallet or account state on v1.</p><p>PII minimization — mask in answers; log tool calls, not full payloads, where policy requires.</p><p>Latency budget — internal ops tool, not player-facing; still cap total round-trips (parallel tools where safe).</p><p>Single player context — ambiguous `player_id` → clarify or fail closed; never guess across accounts.</p><p>Reuse enterprise sources — transaction summary DB, existing Grafana/Loki, back-office APIs — no shadow “assistant database” of player truth.</p><p>Without Preliminary, you get a clever demo that compliance will shut down in week two.</p><h4>Phase A — Architecture Vision: the pain in business language</h4><p>ADM question: What problem are we solving, for whom, and what does success look like?</p><p>Drivers</p><p>Investigation time for payment and gameplay issues — too many handoffs</p><p>Inconsistent answers when support, fraud, and back office each query different systems</p><p>Peak load on senior staff — “only Maria knows which Grafana dashboard”</p><p>Regulatory and audit pressure — explainable answers with source citations</p><p>Vision (shape we aligned on)</p><p>An internal assistant that answers player investigation questions by orchestrating read-only access to transaction summaries, observability logs, and back-office context — with cited sources, bounded tools, and human escalation when confidence is low.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IDANQErybAwySgi3rEXuWw.jpeg" /></figure><p>PII boundaries; model governance; build vs buy clarity</p><p>Phase A succeeds when stakeholders argue about workflow and risk, not about “which LLM is coolest.”</p><h4>Phase B — Business Architecture: what “investigation” actually means</h4><p>ADM question: What capabilities must exist?</p><p>The business capability is investigation throughput with auditability — not “chat.”</p><h4>Phase C — Data Architecture: three truths, one timeline</h4><p>ADM question: What data may the assistant use, and how fresh must it be?</p><p>Systems of record (tools only)</p><p>1. Transaction summary store — deposits, withdrawals, bets, settlements; aggregated for investigation (not raw ledger replay on every question).</p><p>2. Observability stack — Grafana → Loki (or equivalent); service labels, trace IDs, payment pipeline errors.</p><p>3. Back office — player profile, verification state, bonus blocks, responsible-gaming flags.</p><p>RAG corpus (context only)</p><p>Embed and retrieve:</p><p>-Schema and enum docs — what `WITHDRAWAL_FAILED` means vs `PENDING_REVIEW`</p><p>Runbooks — “if withdrawal failed, check payment gateway logs then settlement batch”</p><p>Playbooks — escalation paths, jurisdiction notes</p><p>ADR snippets — e.g. one-writer-per-ledger, fail-open vs fail-closed boundaries</p><p>Do not RAG: live rows, full log streams, or exports of player PII.</p><p>Column meanings; status enums</p><p>Live txn rows from summary views</p><p>Full log streams</p><p>Investigation runbooks</p><p>Grafana/Loki query results</p><p>PII exports for retrieval</p><p>ADR / policy snippets</p><p>Back-office API responses</p><p>Credentials or raw SQL access</p><p>That split is the most important data decision in the whole system.</p><h4>Phase D — Technology Architecture: LangGraph, MCP, RAG roles</h4><p>ADM question: How do components interact under load and governance?</p><p>LangGraph — orchestration, not magic</p><p>LangGraph models investigation as a state machine, not one-shot completion:</p><pre>User question → <br>classify intent + extract entities (player_id, time window, txn id) <br>→ plan tools (which sources, in what order)<br>→ execute tools (parallel where independent) <br>→ reconcile (timeline merge, conflict detection)<br>→ answer (cited) OR escalate</pre><p>Why graph, not chain: investigations branch. A failed withdrawal triggers log pull ±5 minutes <em>and</em> txn lookup <em>and</em> back-office hold flags. Some paths are deterministic (“if txn status = FAILED, always query payment-service logs”) — encoded as edges, not left to model improvisation.</p><h4>Why LangGraph? (the ARB decision)</h4><p>Player investigations are stateful, branching, and audit-sensitive. We needed orchestration we could diagram, test, and govern — not a chatbot improvising across money, match state, and logs.</p><p>What we rejected:</p><p>Single LLM + mega-prompt</p><p>Hallucinated txn state; no audit trail; ungovernable</p><p>Linear chain (A → B → C)</p><p>Cannot branch; hard to encode conditional investigation playbooks</p><p>Fully autonomous agent</p><p>Unacceptable risk on wallet / account paths for v1</p><p>Vendor “AI ops” suite only</p><p>Poor fit to game events, custom back office, Grafana label discipline</p><p>Dashboards only</p><p>Visibility without synthesis and citations across three systems</p><p>EA one-liner: LangGraph and deterministic playbooks — not fully autonomous agents on money paths. LangGraph orchestrates when to call tools; MCP defines how; RAG supplies context — not truth.</p><h4>MCP — one protocol, many enterprise boundaries</h4><p>Model Context Protocol gives each data source a tool server with a narrow contract:</p><p>MCP is EA-friendly: it is integration with boundaries — the same conversation you would have about REST vs event bus, but oriented to agent tool access.</p><p>Rejected alternative: one mega-prompt with DB credentials — fast to demo, impossible to govern.</p><h4>RAG — explains; tools prove</h4><p>RAG answers: <em>“What should an analyst check next?”</em></p><p>MCP answers: <em>What actually happened to player X at 14:32?”</em></p><p>Mixing them -e.g. embedding yesterday’s txn export — creates stale truth. ADM Phase C exists to prevent that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oANYXsDckZusgXAv.jpg" /></figure><h4>Phase E — Opportunities &amp; Solutions: build vs buy vs reuse</h4><p>EA rule:<em> Build the control plane and investigation workflow. Reuse every system of record.</em></p><p>This mirrors how we treated RTQE (platform, not CRM patch) and offline segmentation (Spark reuse, thin control plane) — same triangle, new surface.</p><h4>Phase F — Migration: pilot without betting the bank</h4><p>ADM question: How do we land safely?</p><p>1. Read-only pilot — support tier-2 only; predefined question templates + free text</p><p>2. Golden questions — 50 real (anonymized) investigations with expected citations</p><p>3. Shadow mode — assistant suggests; human executes until accuracy threshold</p><p>4. Expand intents- payment → bonus → gameplay → KYC</p><p>5. Metrics — time-to-resolution, escalation rate, tool error rate, citation coverage</p><p>No big-bang “replace every dashboard.” Strangler fig on workflow, not infrastructure.</p><h4>Phase G — Implementation governance: ARB decisions that stuck</h4><pre>ADR-008: <br>Player investigation assistant <br>LangGraph orchestration, MCP tools, RAG for context onlyStatus:<br>Accepted Date: 03/01/2026<br>Deciders: Architecture Board, Support Ops, Fraud, Payments, SRE, Data Platform, Risk<br>Context: Support, fraud ops, and back office investigate player issues by manually querying transaction summaries, Grafana/Loki logs, and back-office APIs. Answers are slow, inconsistent, and hard to audit. A generic &quot;chat with your data&quot; approach risks hallucinated financial facts and unbounded database access.<br>Decision Build an internal player investigation assistant: LangGraph- stateful orchestration (classify → plan → execute tools → reconcile → answer or escalate). Chosen over linear chains and one-shot prompts because investigations branch (payment vs gameplay vs bonus), require explicit state for audit, and need deterministic edges (e.g. FAILED txn → always pull payment-service logs) that ARB can diagram and version in Phase H MCP servers - one bounded tool surface per system of <br>record: `transaction_summary` - read-only parameterized queries on summary views `grafana_loki` - time-bounded LogQL with service allowlist `back_office` - scoped REST for account flags and context RAG - embed docs only (schema, enums, runbooks, ADR snippets); never live txn rows or log streams Citations required - factual claims must reference tool output ids Fail closed on ambiguous `player_id` or conflicting tool resultsConsequences Positive: Faster investigations; consistent citations; reusable MCP servers for future automations; clear security boundary (tools vs retrieval). Negative: LangGraph flow maintenance; MCP server ownership per domain team; golden-question regression suite required on model changes. Obligations: No free-form SQL from the model; quarterly access review; version MCP schemas when summary views change; shadow mode before full rollout.Alternatives considered | Alternative | Why rejected | |-------------|--------------| | Single prompt with DB + Grafana credentials | Ungovernable; audit nightmare | | RAG over exported txn/log snapshots | Stale truth; PII surface area | | Buy vendor &quot;AI ops&quot; suite only | Poor fit to gaming txn + custom back office; lock-in | | Dashboards only | Solves visibility, not synthesis and audit trail | | Autonomous agent with write tools | Unacceptable risk on wallet/account paths for v1 |</pre><p>1. No free-form SQL from the model — only named queries / views behind MCP</p><p>2. Citations required — every factual claim links to tool output id</p><p>3. Parallel tool cap — e.g. max 3 concurrent MCP calls per request</p><p>4. Log query ceiling — e.g. 24h default window; wider requires role</p><p>5. Conflict rule — if txn says SUCCESS and logs show ERROR, answer reports conflict and escalates</p><p>6. Synthesize→ timeline paragraph + bullet citations + “escalate if dispute” not</p><h4>Phase H — Change management: models drift; policies do not</h4><p>ADM question: How does this stay correct as systems and abuse patterns change?</p><p>Version MCP tool schemas when txn summary views change</p><p>Re-embed runbooks when payment rail changes</p><p>Re-run golden questions after model upgrades</p><p>Quarterly access review — who can ask what across back office fields</p><p>Incident retro- when the assistant was wrong, fix the graph edge or tool, not only the prompt</p><p>Phase H is where EA earns trust. Chatbots without change governance become folklore.</p><h4>What we learned (the “and not vs” section)</h4><p>LangGraph and deterministic playbooks — not fully autonomous agents on money paths</p><p>MCP and strict tool contracts — not credentials in the prompt</p><p>RAG and live queries — retrieval for <em>meaning</em>, tools for <em>truth</em></p><p>Speed and auditability — parallel tools help; citations are non-negotiable</p><p>The assistant did not replace RTQE (millisecond behavioral queries for CRM/ML) or the fraud engine (hot-path decisioning). It complements them — human-speed investigation across systems that were never one join.</p><h4>When not to build this</h4><p>Skip or defer if:</p><p>You do not yet have clean transaction summaries — fix data architecture first</p><p>Grafana labels cannot reliably scope player or payment correlation</p><p>Legal has not signed off on LLM-generated text near player data</p><p>The real problem is missing dashboards, not missing synthesis — cheaper fixes exist</p><p>EA honesty: sometimes the right ADM outcome is better Grafana boards and a runbook, not an agent.</p><h4>Wrapping up</h4><p>A player-query assistant sounds like an AI story. Underneath, it is the same EA work: stakeholders, systems of record, integration boundaries, build vs reuse, and governance on production paths.</p><p>LangGraph gives you orchestration you can diagram. MCP gives you enterprise seams your security team can reason about. RAG gives context — if you refuse to let it become a second database of player truth.</p><p>If you are standing up something similar: decide Phase C first. Everything else is implementation.</p><p><em>Originally published at </em><a href="https://ranadeepdev.com/powerful-rag-with-langgraph-and-mcp-for-player-queries/"><em>https://ranadeepdev.com</em></a><em> on September 21, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1637bfe55d56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Every Architecture Decision You Skip Recording, You Pay For Twice]]></title>
            <link>https://medium.com/@ranadeep.1226/every-architecture-decision-you-skip-recording-you-pay-for-twice-767dab116876?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/767dab116876</guid>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 13:28:42 GMT</pubDate>
            <atom:updated>2026-09-18T07:40:07.996Z</atom:updated>
            <content:encoded><![CDATA[<h4>What missing ADRs cost when you build a Dynamic Real-Time Query Engine — not Slack archaeology</h4><p>When a new requirement lands, we open the Architecture Review Board (ARB).</p><p>Someone says “buy another CRM tool.” Someone says batch is fine. Someone says “we already decided this.” Nobody can find where.</p><p>That is not a tooling problem. It is a memory problem — and on a live gaming platform, forgotten decisions become production incidents, re-opened fights, and sprints that undo last year’s work.</p><p>Architecture Decision Records (ADRs) are how you stop paying twice. Not bureaucracy. Insurance.</p><p>This article is not “what is an ADR” from a textbook. It is a consequence map: decisions we made on a real gaming platform — Dynamic Real-Time Query Engine for CRM and ML, lobby and live tables, wallets, caches, fraud on the hot path — and what broke when we did not record them (or recorded them in Slack and lost them).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0vpdFprBoeAbPcVb.jpg" /></figure><h4>ADR in one sentence (before the horror stories)</h4><p>An ADR is a short, durable note: what we decided, why, what we rejected, and what we will revisit. It lives in the repo or architecture wiki — not in a thread that scrolls away.</p><p>You do not need one ADR per line of code. You need one per decision that will be fought again if nobody wrote it down.</p><p><strong>The decisions that deserved an ADR (gaming platform)</strong></p><p>On our platform, these were not “nice to have.” They were forks in the road:</p><p>Each of these showed up in ARB, stand-up, or a new squad’s first design doc. When we missed recording one, we paid a predictable price.</p><h4>If you miss the ADR — consequences (with examples)</h4><h4>1. Dynamic Real-Time Query Engine — “let’s bolt another tool onto CRM”</h4><p>Decision: Build the Dynamic Real-Time Query Engine (RTQE) as shared platform infrastructure — not a one-team patch. Cassandra time-series (one table per event type), JSON DSL for behavioral segments, REST APIs for CRM, targeting, and the ML Service — millisecond queries while the player is still on screen.</p><p>If <strong>you skip the ADR:</strong></p><p>CRM buys or builds a narrow segmentation tool; ML spins up a second live-events pipeline.</p><p>Consequence: duplicate stores, segments that lag live play, engineering tickets for every new behavioral question — “real-time” becomes tomorrow’s batch.</p><p>Symptom in prod: offer fires after the player left the table; CRM and ML disagree on the same player’s last hour.</p><p><em>What the ADR should have said: Platform not patch. One engine, many consumers. Bounded JSON DSL — not open SQL. Cassandra model: player_id partition, time-series clustering, one table per event type.</em></p><h4>2. RTQE query model — “just expose SQL to CRM”</h4><p>Decision: JSON DSL with bounded query models (aggregates, time windows, expressions) — every query maps to a single-partition, time-bounded Cassandra read. Not open SQL to marketing tools.</p><p>If you skip the ADR:</p><p>Someone exposes read-only SQL “for flexibility.”</p><p>Consequence: unbounded scans, hot partitions, on-call pages during a campaign launch — CRM “self-serve” becomes production roulette.</p><p>Symptom in prod: segment job takes 30 seconds; player already churned; CRM blames “the real-time engine.”</p><p>What the ADR should have said: DSL not SQL. Query bounds by construction. `searchTime` aligns with time-series clustering key.</p><pre><strong>ADR-001:</strong> Dynamic Real-Time Query Engine as shared platform (not CRM patch) <br><strong>Status:</strong> Accepted <br><strong>Date:</strong> 02/15/2025 <br><strong>Deciders:</strong> Architecture Board, CRM, Data Platform, ML, VP Engineering <br><strong>Context:</strong> CRM and marketing needed to understand live player behavior and act while the player is still on screen not via nightly batch jobs. Existing CRM tools could not answer behavioral questions in milliseconds. The easy path was another point solution on the CRM stack; the harder path was shared platform infrastructure. <br><strong>Decision:</strong> Build the Dynamic Real-Time Query Engine (RTQE) as a foundational building block: Apache Cassandra - one table per event type, time-series keyed by `player_id` + event timestamp JSON DSL - bounded behavioral queries (aggregates, time windows, expressions) - not open SQL Event ingest pipeline - decoupled producers into the engine (point-to-point queues) Java 21 + Spring Boot - REST APIs for CRM, targeting, and ML Service consumers Platform scope - same engine serves multiple consumers - not a single-team patch <br><strong>Consequences:</strong> Positive: Millisecond segments on live play; CRM self-serve in JSON; ML gets real-time features from one pipeline; ~100K req/s headroom with virtual threads and horizontal scale. Negative: Custom DSL to maintain; Cassandra modeling discipline required; platform team owns SLAs for all consumers. <br><strong>Obligations:</strong> Query bounds by construction; one-table-per-event-type schema governance; document rejected &quot;SQL over everything&quot; and &quot;CRM-only tool&quot; paths. <br>| Alternative | Why rejected | |-------------|--------------| | Bolt-on CRM segmentation tool | Solves one team; duplicate pipelines for ML; batch mindset | | Expose raw SQL to CRM | Unbounded queries; safety and ops risk on hot path | | Single generic events table | Partition and query unpredictability; fights Cassandra strengths | | Nightly batch only | Misses the conversion window - player already left |</pre><h4>3. REST lobby + WebSocket game — “let’s poll matchmaking from the socket”</h4><p>Decision: REST (or HTTP API) to Lobby — find and join a table. WebSocket to Game — live play, broadcast state.</p><p>If you skip the ADR:</p><p>Mobile team polls lobby state over the game socket every 500ms for simplicity.</p><p>Consequence: socket fan-out load explodes; matchmaking logic bleeds into game shards; you cannot scale browse traffic separately from seated players.</p><p>Symptom in prod: lobby spike during a tournament drags down live tables — the failure domain you split on purpose.</p><p>What the ADR should have said: <em>Door = REST. Room = WebSocket. Do not merge because one client library is easier.</em></p><pre><strong>ADR-002:</strong> REST for lobby (door), WebSocket for game (room) <br><strong>Status:</strong> Accepted <br><strong>Date:</strong> 02/15/2025<br><strong>Deciders:</strong> Mobile, Lobby, Game squads, ARB<br><strong>Context:</strong> Matchmaking is request/response: find table, seat player, return connection info. Live play is a long-lived session: broadcast state, play events, timers. Mixing both on one channel couples browse traffic to seated-player scale. <br><strong>Decision:</strong> REST (HTTP API) to Lobby Service for matchmaking, presence, seat assignment. - WebSocket to Game Service for live table play after seat confirmed. - Session handoff: lobby returns game shard / token; client opens socket to game fleet. <br><strong>Consequences:</strong> Positive: Scale lobby on browse traffic independently; clear failure domains; matches client mental model (door vs room). Negative: Two client integrations; handoff bugs if token/session contract drifts. <br><strong>Obligations:</strong> Document handoff flow in API spec; integration tests for seat → connect path. Alternatives considered | <br>Alternative | Why rejected | |-------------|--------------| | WebSocket for lobby polling | Fan-out and unnecessary persistent connections for short requests | | REST for live play | Polling latency unacceptable for table state; wrong conversation shape | | Single monolith socket | Failure domain and scale coupling we were leaving |</pre><h4>4. Hazelcast vs Redis — the annual CAP debate</h4><p>Decision: Hazelcast (remote cluster, sync backup, CP locks) for recoverable table state when a game node dies. Redis (cluster) for leaderboards where slightly stale ranks are acceptable.</p><p>If you skip the ADR:</p><p>Every new hire proposes Redis for everything or Hazelcast for “leaderboards too.”</p><p>Consequence: quarters lost to benchmarks and slide decks; wrong tool on wrong workload; wallet or pot state in a cache that was never meant to be the ledger.</p><p>Symptom in prod: failover restores the wrong pot; leaderboard shows ranks from before a partition.</p><p>What the ADR should have said: <em>HZ = coordination + recovery (lean C). Redis = high-read scores (lean A). Money still flows queue + DB.</em></p><pre><strong>ADR-003:</strong> Hazelcast for table recovery, Redis for leaderboards <br><strong>Status:</strong> Accepted Date: Post modularization scale-up <br><strong>Deciders:</strong> Platform ARB, Game squad<br><strong>Context:</strong> Game nodes are pinned per table with local active state. On node death, we must recover pot, seats, and turn without split-brain. Leaderboards are high-read, tolerate slight staleness, and do not need CP semantics for every rank update. <br><strong>Decision:</strong> Remote Hazelcast cluster (six members, clients only from game/lobby services): `IMap` with sync backup for table snapshots; CP locks + fencing on failover. Redis cluster (three nodes) for leaderboards reads/writes - eventual consistency acceptable for ranks. Wallet ledger stays queue + database - not in either cache. <br><strong>Consequences:</strong> Positive: Correct recovery for live money tables; leaderboard scale without HZ partition pressure on every rank tick. Negative: Two cache platforms; clear ownership required per workload. Obligations: Failover drills; monitor backup lag; no dual writers on game state. <br><strong>Alternatives:</strong> considered | Alternative | Why rejected | |-------------|--------------| | Redis for table state | Wrong CAP fit for pot recovery without careful fencing; risk of split brain | | Hazelcast for leaderboards | Overkill; CP cost not justified for ranks | | Embedded HZ in game JVM | Blast radius; fleet churn reshapes grid |</pre><h4>5. One writer per ledger — “we’ll dual-write during migration”</h4><p>Decision: During strangler migration, only Transaction Service writes the wallet ledger. Monolith wallet path must decommission, not linger “just in case.”</p><p>If you skip the ADR:</p><p>Plateau 1 ships with two writers — monolith and new service both mutate balance.</p><p>Consequence: race conditions, support tickets (“where did my chips go?”), reconciliation nightmares, audit failure.</p><p>Symptom in prod: player balance disagrees with ledger after a hand — the gap ArchiMate was supposed to close.</p><p>What the ADR should have said: <em>One writer per ledger. Coexistence duration named. Decommission rule in the same doc as the migration ADR.</em></p><pre><strong>ADR-004</strong>: One writer per wallet ledger during strangler migration<br><strong>Status</strong>: Accepted Date: Plateau 1 (transactions strangler) <br><strong>Deciders</strong>: Transactions squad, Platform ARB, Risk <br><strong>Context</strong> Extracting Transaction Service while the monolith still serves lobby and game creates a coexistence window. Dual wallet paths are tempting for &quot;safety&quot; but produce race conditions and audit gaps. <br><strong>Decision</strong> Transaction Service is the sole writer to the wallet ledger after cutover. Monolith in-process wallet mutation decommissioned by named date - not left dormant. Coexistence: read paths may dual-serve briefly; writes do not.<br><strong>Consequences</strong> Positive: Auditable ledger; support can trust one source of truth; strangler gap closes cleanly. Negative: Requires feature flags and migration testing; rollback plan must be explicit. <br><strong>Obligations:</strong> ADR linked in ArchiMate gap P0→P1; reconciliation job until decommission complete. <br><strong>Alternatives</strong> considered | Alternative | Why rejected | |-------------|--------------| | Dual-write monolith + service | Race conditions; &quot;where did my chips go?&quot; tickets | | Big-bang cutover weekend | Unacceptable downtime risk for live tables | | Ledger in game cache | Violates money-off-hot-path principle |</pre><h4>6. Fail-open vs fail-closed — fraud on the hot path</h4><p>Decision: On player-facing blocks, prefer explainable decisions and clear audit. On hot-path latency, define what happens when the fraud engine is unavailable — fail — open vs fail-closed is a business choice, not a default in the SDK.</p><p>If you skip the ADR:</p><p>On-call flips behavior under pressure without a recorded principle.</p><p>Consequence: either legitimate players frozen at peak (revenue loss) or abuse runs unchecked during an outage (loss + trust hit).</p><p>Symptom in prod: incident post-mortem says “we thought prod was fail-closed” — staging was fail-open.</p><p>What the ADR should have said: <em>Gameplay path: [X]. Wallet path: [Y]. Owner: Risk + Platform. Review when SLA changes.</em></p><pre><strong>ADR-005</strong>: Fail-open vs fail-closed on the fraud hot path <br><strong>Status</strong>: Accepted Date: Fraud engine Phase D (Technology Architecture) <br><strong>Deciders</strong>: Risk, Payments, Platform ARB, Game squad Context The real-time fraud engine sits on game and payment hot paths. When the<br><strong>Decision:</strong> API is slow or unavailable, someone must decide: block traffic (fail-closed) or allow traffic (fail-open) until recovery. That is not an SDK default - it is a business and compliance choice. Without a recorded policy, staging, prod, and on-call behave differently. <br>Decision Define a policy matrix by path and transaction type - documented, tested, and owned by Risk + Platform: | Path | Default when engine unavailable | Rationale | |------|----------------------------------|-----------| | Gameplay / join table | Fail-open with rate limits + post-hoc review | Revenue and player experience at peak; friction on outage freezes live tables | | Wallet / buy-in / payout | Fail-closed (or queue + async settle with hold) | Money movement requires audit; abuse during outage is unacceptable | | High-value withdrawal | Fail-closed always | Chargeback and regulatory exposure | Cross-cutting rules: Explainable reason codes required for any player-facing block when engine is healthy Shadow mode in migration - score beside legacy; do not enforce until false-positive SLA holds Break-glass override with Risk RACI - not an undocumented on-call toggle Same matrix in staging and prod - no silent drift <br><strong>Consequences:</strong> Positive: Incidents have a playbook; no &quot;we thought prod was fail-closed&quot;; ARB can govern Phase G against a written matrix. Negative: Fail-open on gameplay accepts temporary abuse risk - must pair with velocity caps, DLQ review, and post-incident replay. <br><strong>Obligations</strong>: Latency budgets measured; policy matrix in runbooks; ADR linked from Decision API config and ArchiMate technology constraints. <br><strong>Alternatives: </strong>considered | Alternative | Why rejected | |-------------|--------------| | One global fail-closed | Legitimate players frozen at peak; revenue loss during engine blip | | One global fail-open | Wallet abuse during outage; audit and trust failure | | On-call decides per incident | Inconsistent behavior; post-mortem blame without policy | | Hard-code in payment service only | Game path undocumented; six squads, six truths | | Vendor SDK default | Business policy hidden in library; not governed by ARB |</pre><h4>7. Build vs buy vs reuse — “let’s build our own Spark”</h4><p>Decision: Reuse Apache Spark for offline segmentation; buy managed EMR where the bill fit; build only the thin control plane (scheduling, tenancy, guardrails) — not a second distributed compute engine.</p><p>If you skip the ADR:</p><p>A squad starts a 10-month “lightweight batch engine” because EMR “felt expensive” on one slide.</p><p>Consequence: duplicate platform, no hiring market, security review from scratch — savings illusion.</p><p>Symptom in prod: two batch systems, neither owned; CRM segments diverge from real-time truth.</p><p>What the ADR should have said: <em>Reuse Spark. Buy EMR when TCO wins. Build only orchestration we cannot buy.</em></p><pre><strong>ADR-006:</strong> Build vs buy vs reuse for offline segmentation (Spark) <br><strong>Status: </strong>Accepted Date: Phase E (Opportunities &amp; Solutions) - after RTQE platform <br><strong>Deciders:</strong> Platform ARB, Data Platform, CRM, Finance <br><strong>Context:</strong> CRM needed offline behavioral segments that aligned with the Dynamic Real-Time Query Engine - same player truth, batch scale for campaigns and analytics. The commodity capability is distributed batch compute. The enterprise question was not &quot;Spark or not Spark&quot; but reuse the engine, buy managed EMR, or build a custom runtime. <br><strong>Decision:</strong> Compose - do not pick one label for everything: | Choice | What we chose | What it means | |--------|---------------|---------------| | Reuse | Apache Spark | Offline segmentation engine- commodity distributed compute; do not reinvent | | Buy (evaluated) | Amazon EMR - not selected for this workload | EMR scales; for our utilization pattern the bill was ~10x a lean in-house runtime | | Build | Thin control plane only | Spark master on EC2 (published IP); worker pods autoscale; custom scaler (5‑min warm-up, min/max per job); ~10 days to deliver | <br><strong>Rules recorded</strong>: Reuse what is commodity (Spark). Buy when TCO and operating model both fit. Build only the layer that turns reuse into enterprise fit - not a second batch engine. Offline segments must trace to the same event semantics as RTQE - no shadow data estate for CRM. Owner: Data Platform operates runtime, scaler, and upgrades. <br><strong>Consequences: </strong>Positive ~10× lower ongoing cost vs EMR path for our pattern; delivery in ~10 days; CRM segments stay aligned with real-time truth. Negative: We own Spark master failover, scaler logic, and security patches - not EMR&#39;s managed boundary. <br><strong>Obligations:</strong> Revisit EMR when utilization or compliance changes; document payback in ARB; no &quot;build our own Spark&quot; proposals without new context. <br><strong>Alternatives:</strong> considered | Alternative | Why rejected | |-------------|--------------| | Buy EMR for this workload | Capability fit yes; cost fit no (~10× bill for our utilization) | | Build a new batch engine from scratch | Enterprise malpractice; no hiring market; years of maintenance | | CRM vendor segmentation module only | Duplicate pipeline; diverges from RTQE player truth | | Reuse Spark with no control plane | Could not meet warm-up, per-job limits, tenancy we needed | | Buy only - no reuse/build split | Treated &quot;buy&quot; as slogan; ignored thin-build payback |</pre><h4>Strangler order — “let’s split lobby first, it’s easier”</h4><p>Decision: Transactions module first via broker — money off the monolith hot path. Lobby + game split in Plateau 2. Sequence documented in migration model and ADRs.</p><p>If you skip the ADR:</p><p>Product pushes lobby microservice first because the UI team is ready.</p><p>Consequence: pretty services, money still in the monolith — the riskiest coupling untouched; false sense of “we migrated.”</p><p>Symptom in prod: “we’re on microservices” but a stuck wallet call still kills live tables.</p><p>What the ADR should have said: <em>Plateau 1 = transactions strangler. Plateau 2 = REST lobby + WebSocket game. Link to ArchiMate gap.</em></p><pre><strong>ADR-007:</strong> Strangler migration order - transactions before lobby split <br><strong>Status:</strong> Accepted <br><strong>Date:</strong> ADM Phase F (Migration Planning) <br><strong>Deciders:</strong> Platform ARB, Product, Game, Transactions, Lobby squads <br><strong>Context:</strong> Moving from a socket monolith (lobby + game + wallet in one deployable) to modular services tempts teams to split what is easiest first - often lobby/UI - while money stays in the monolith. That creates a false &quot;we migrated&quot; story and leaves the highest-risk coupling (gameplay tick + wallet) untouched. Migration order is an architecture decision, not a sprint convenience.<br><strong>Decision:</strong> Strangler sequence - documented in ArchiMate plateaus and ADRs: | Plateau | Work package | What ships | Monolith still owns | |---------|--------------|------------|---------------------| | Plateau 0 | - | Baseline monolith | Lobby, game, wallet (all in one) | | Plateau 1 | WP1 - Extract transactions | Broker + Transaction Service; one ledger writer | Lobby + game | | Plateau 2 | WP2 - Split lobby and game | REST lobby + WebSocket game handoff | - (target modular) | | Later | WP3+ (optional) | Shard game fleet, containerize, autoscale | Per roadmap | <br><strong>Rules recorded:</strong> 1. Plateau 1 = transactions strangler first - money off the gameplay hot path before cosmetic service splits. 2. Plateau 2 = REST lobby + WebSocket game - only after Plateau 1 coexistence rules and ledger ADR (ADR-004) are met. 3. No big-bang weekend - each plateau runs in production with named gaps and decommission dates. 4. Product priority does not override sequence without new ARB context (supersede this ADR). <br><strong>Consequences:</strong> Positive: Riskiest coupling addressed first; live tables keep running; board can recognize plateau transitions; aligns with ADM Phase F and Agile increments. Negative: Lobby/UI teams wait for Plateau 2; requires patience and visible migration model so squads do not fork private diagrams. <br><strong>Obligations:</strong> ArchiMate work packages link to ADR-004 (one writer) and this ADR; sprint reviews ask &quot;which plateau does this close?&quot; Alternatives considered | <br><strong>Alternative:</strong> | Why rejected | |-------------|--------------| | Lobby microservice first (UI ready) | Money still in monolith; stuck wallet call still kills live tables | | Big-bang cutover | Unacceptable downtime; no coexistence learning | | Game split before transactions | Money path remains on hottest failure domain | | Target-state-only migration (skip Plateau 1) | Poster architecture; production never matches model | | Parallel all services at once | Six squads, three buses, no decommission plan |</pre><h4>The pattern when ADRs are missing</h4><p>What you feel What is actually happening</p><p>“We already decided this”</p><p>Decision lived in <strong>Slack / a meeting / one senior’s head</strong></p><p>“Why did they build it that way?”</p><p><strong>No rejected-options trail</strong> — looks like incompetence, was often a tradeoff</p><p>“New squad, same fight”</p><p><strong>Organizational amnesia</strong> — cheaper to write 1 page than rerun ARB</p><p>“Rollback panic”</p><p>Nobody remembers <strong>coexistence rules</strong> from migration</p><p>“Architecture is slow”</p><p>You are <strong>re-deciding</strong> instead of <strong>referencing</strong></p><p>ADRs do not slow you down. They buy back the quarters you lose re-fighting “batch CRM vs real-time platform” — or Hazelcast vs Redis.</p><h4>What to put in an ADR (minimum viable)</h4><p>1. Title — e.g. `ADR-001: Dynamic Real-Time Query Engine as shared platform (not CRM patch)`</p><p>2. Status — Proposed | Accepted | Superseded</p><p>3. Context — pressure, constraints, plateau you are in</p><p>4. Decision — one clear paragraph</p><p>5. Consequences — positive, negative, what we owe ops/security</p><p>6. Alternatives considered — what you said no to and why</p><p>Length: one to two screens. If it reads like a thesis, nobody will write the next one.</p><p>Where it lives: `docs/adr/` in the repo, or wiki linked from the ArchiMate work package and the Jira epic. Same decision, three doors — one truth.</p><h4>ADRs × ADM × Agile × ArchiMate</h4><h4>Anti-patterns (ADR edition)</h4><p>Slack as ADR — searchable until it is not; context dies on scroll</p><p>ADR after the outage — post-mortem theater, not architecture</p><p>ADR per README paragraph — team stops writing them</p><p>No “superseded”- two contradictory ADRs, both “accepted”</p><p>ADR with no rejected options- future you cannot defend the call</p><p>Architecture PDF instead of ADRs — pretty, disconnected from backlog</p><h4>Checklist: does this decision need an ADR?</h4><p>1. Will a new squad ask “why?” in six months?</p><p>2. Did we reject something credible?</p><p>3. Does it affect money, play, or compliance on the hot path?</p><p>4. Does it sequence migration (plateau, coexistence, decommission)?</p><p>5. Will ops need to know failover behavior?</p><p>If yes to two or more — write the ADR before merge, not after the incident.</p><h4>Wrapping up</h4><p>On a live gaming platform, every architecture decision you skip recording, you pay for twice: once when you make it, again when someone unknowingly unmakes it.</p><p>RTQE as platform. REST vs WebSocket. Hazelcast vs Redis. One writer per ledger. Fail-open vs fail-closed. Build vs buy vs reuse. Strangler order.</p><p>None of those are secret wisdom. They are decisions — and decisions without ADRs become mysteries, then incidents, then quarters in ARB.</p><p>Record the call. Name what you rejected. Link it to the plateau.</p><p>That is EA doing its job: memory over slogans.</p><p>Note on the sample ADRs in this article (ADR-001 through ADR-007 — RTQE platform, REST/WebSocket, Hazelcast/Redis, one ledger writer, fail-open/fail-closed, build vs buy vs reuse, strangler order): they are illustrative mocks — written in real ADR shape to show context, decision, rejected options, and consequences. They are not the literal records from our Architecture Review Board. In production, your ADRs live in your repo or wiki, carry your IDs, dates, deciders, and may differ in detail — use the samples as templates, not as copies of our internal governance pack.</p><p><em>Originally published at </em><a href="https://ranadeepdev.com/every-architecture-decision-you-skip-recording-you-pay-for-twice/"><em>https://ranadeepdev.com</em></a><em> on September 13, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=767dab116876" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ArchiMate Is Not a Diagram Contest]]></title>
            <link>https://medium.com/@ranadeep.1226/archimate-is-not-a-diagram-contest-4281badc4299?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/4281badc4299</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[togaf]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[archimate]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sat, 12 Sep 2026 15:13:44 GMT</pubDate>
            <atom:updated>2026-09-12T18:28:10.562Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Model migration so every squad sees the same map — a live gaming platform example</strong> <strong>ArchiMate gets dismissed the same way TOGAF sometimes does: <em>too theoretical, too many boxes, nobody reads it.</em></strong> <strong>That is fair — when ArchiMate is used as wallpaper.</strong></p><p>It becomes valuable when you are in the middle of a migration and six squads are drawing six different pictures of the monolith we are leaving and “the platform we are building.” Lobby thinks matchmaking is already separate. Transactions thinks money moved last quarter. Platform thinks RabbitMQ is “temporary.” Product thinks the cutover is next sprint.</p><p>At that moment, ArchiMate is not ceremony. It is a shared language for baseline, target, gaps, and plateaus — the same story ADM Phase F asks for, but visible to engineers, product, and the architecture board.</p><p>This article shows how to model a real migration on a live gaming platform: monolith → modular services (lobby, game, transactions) with a message broker on the money path and strangler increments — not every ArchiMate element, only the ones that stop migration arguments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rejI-A32nDYHzttj.jpg" /></figure><p><strong>Why migration is the right ArchiMate proving ground</strong></p><p>Migrations fail in predictable ways:</p><p>Invisible dependencies — “we extracted transactions” but the monolith still writes wallet state</p><p>Fake target states — microservices on a slide, monolith in production</p><p>Big-bang fantasy — no plateaus, no coexistence rules</p><p>Squad-local truth — each team’s diagram stops at its repo boundary</p><p>ArchiMate does not fix those by itself. It fixes them when you model what exists, what must exist, what changes between plateaus, and who delivers each slice.</p><p>If ArchiMate only works on greenfield data-center refresh decks, it is not Enterprise Architecture. Strangler migration on a live game platform is the stress test.</p><p><strong>ArchiMate in one sentence (before we draw anything)</strong></p><p>ArchiMate is a standard notation for describing enterprise architecture across business, application, and technology — and for showing how you move from today to tomorrow without pretending tomorrow arrives in one weekend.</p><p>You do not need every viewpoint. You need the right viewpoint for the decision in the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t19aEfaab62NexzH8vHftQ.png" /></figure><p>ADM tells you <em>to</em> plan migration (Phase F). ArchiMate shows <em>what</em> you are migrating <em>in which order</em>.</p><p>The example: baseline monolith on a gaming platform</p><p>Baseline (Plateau 0): one application component does too much.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvSvkIaBEvFS4UeyJXcSIQ.png" /></figure><p>The pain in EA language: gameplay hot path and money path share process, deployment, and failure domain. A spike in lobby traffic or a stuck wallet call can drag down live tables.</p><p>This is not a drawing exercise. It is the baseline plateau every squad must agree on before “we already migrated” conversations start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WLBiiOuOJVM6n7Eo.jpg" /></figure><p>Target: separate capabilities into application components with clear serving relationships — clients and other apps call services, not “the server.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Dr7uVU5nbHRlKe_C8xvrg.png" /></figure><p><strong>Client pattern (from the real journey):</strong></p><p>REST (or HTTP API) to Lobby — door: find and join a table</p><p>WebSocket to Game — room live play</p><p>Broker between Game and Transactions — money off the gameplay hot path</p><p>ArchiMate relationships to model explicitly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JbDoof5uRSQEWPLGNI0p5w.png" /></figure><p><strong>Triggering</strong></p><p><em>Buy-in requested</em> triggers a payment command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3PyZUPA50LXM5VkR.jpg" /></figure><p><strong>The part people skip: plateaus and gaps</strong></p><p>Migration is not binary. ArchiMate’s Implementation &amp; Migration viewpoint exists because Plateau 1 is where production actually lives.</p><p><strong>Plateau 0 — Monolith (baseline)</strong></p><p>Everything in one component. Money and play in one failure domain.</p><p><strong>Plateau 1 — Strangler: transactions extracted, monolith still plays</strong></p><p><strong>Work package:<em> Extract transaction module; route wallet commands via broker.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFs1R8hyR4xUA-E6HjHS5A.png" /></figure><p><strong>Monolith</strong> loses wallet mutation</p><p>Gap: retire <em>in-process wallet</em> behavior</p><p><strong>RabbitMQ</strong> (or similar) as <strong>Technology service</strong></p><p>New <strong>Flow</strong> between Game and Transactions</p><p>Coexistence rule</p><p>Monolith still owns lobby + game; transactions own ledger writes</p><p><strong>Gap (Plateau 0 → 1):</strong></p><p><em>Duplicate wallet path</em> — monolith code path must be decommissioned, not left “just in case”</p><p>Data ownership — one writer to ledger (record in model + ADR)</p><p><em>Operational owner ship</em> — who runs the broker, queues, and DLQ</p><p>This is the increment <a href="https://ranadeepdev.com/adm-and-agile-complement-each-other/">ADM + Agile articles describe</a> transactions module first, live tables keep running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CeszUpEUETGiebkO.jpg" /></figure><p><strong>Plateau 2 — Lobby and game separated</strong></p><p>Work package:<em> Split lobby matchmaking from game session; REST door + WebSocket room.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIHA2Wbf-sdSX-OSXbFj0Q.png" /></figure><p>Session handoff</p><p>Lobby assigns table; Game owns socket room</p><p>Identity / session token</p><p>Model <strong>Flow</strong> of “seat confirmed → connect to game shard”</p><p>Scale independence</p><p>Lobby scales on browse traffic; game scales on seated players</p><p><strong>Plateau 3 — Shard game fleet, containerize (optional further plateau)</strong></p><p>Aligns with the 200K concurrent journey: stateless game engines, externalized state, autoscale — another plateau, not a surprise Phase F slide.</p><p><strong>EA rule:<em>Model every plateau you will actually run in production — not only baseline and dream target.</em></strong> <strong>What to put on the diagram (and what to leave off)</strong></p><p>Model these for migration</p><p>Application components you will deploy separately</p><p>Application services other teams call</p><p>Flows that cross team boundaries (especially money)</p><p>Plateaus with dates or release trains</p><p>Gaps with named work packages and owners</p><p>Principles as constraints ( <em>one writer per ledger</em>, <em>money off hot path</em>)</p><p><strong>Do not model these (yet)</strong></p><p>Every class or microservice repo</p><p>Every MQ topic name</p><p>Full cloud networking on day one</p><p>A perfect enterprise map that updates never</p><p>ArchiMate should be just detailed enough that a squad can answer: <em>Does my sprint fit the current plateau?</em></p><p><strong>Migration roadmap (Archi view 4)</strong></p><p>The implementation &amp; Migration viewpoint is where ArchiMate earns its keep: Plateaus, Gaps, and Work Packages on one diagram — not a second poster that ignores today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jx5jUNYvkG7G0rao.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FKI0LYs4GuJb5Sds3sA_ww.png" /></figure><p>In Archi (or BiZZdesign, Sparx), attach deliverables, stakeholders, and ADR links to each work package. The notation is standard the discipline is yours.</p><p><strong>ArchiMate × ADM × Agile (one line each)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*__4_IoTPv85Zf7JH5HqJhw.png" /></figure><p>Without ArchiMate (or an equivalent shared model), Agile ships features; with it, Agile ships plateau transitions the board can recognize.<br><strong>Anti-patterns ArchiMate should kill in migration reviews</strong></p><p>Target-state-only diagram — pretty future, lying about today</p><p>Component per developer — boxes follow org chart, not behavior</p><p>Missing broker — money path drawn as synchronous REST because it is easier to draw</p><p>No gap — “we’ll switch over Friday” with no coexistence rules</p><p>Plateau without owner — work package on a slide, nobody on-call</p><p>ArchiMate as PDF export — model not connected to backlog or ADRs</p><p>Rewriting the whole model every sprint — model plateaus, refine incrementally</p><p>Migration modeling checklist (use in architecture reviews)</p><p>1. Is baseline agreed? One monolith box is not enough — name services, data writers, and hot paths.</p><p>2. Is target a plateau or a fantasy? Target without Plateau 1 is a poster.</p><p>3. What is the next work package? One strangler slice — who owns it?</p><p>4. What gap closes when it ships? Name behavior you stop doing in the old component.</p><p>5. Where does money flow? If it is not on the diagram, it is still in the monolith.</p><p>6. What is coexistence? Two paths may run briefly — model duration and decommission rule.</p><p>7. Which capabilities are realized where? Gameplay vs monetization separation is strategic — show it.</p><p>8. Does the squad’s sprint map to a plateau element? If not, why are we building it?</p><p>If you can not answer these from the model, you are not ready to migrate. You are ready to argue in stand-up.</p><p><strong>Wrapping up</strong></p><p>ArchiMate is not a diagram contest. It is how Enterprise Architecture makes migration legible: baseline monolith, target modular platform, plateaus in between, gaps that close with real work packages.</p><p>On a live gaming platform, that looked like:</p><p>Plateau 0 — socket monolith: play, lobby, money in one place</p><p>Plateau 1 — transactions strangler via broker; one writer to the ledger</p><p>Plateau 2 — REST lobby + WebSocket game; money still off the hot path</p><p>Later plateaus — shard, containerize, autoscale — same model, new gaps</p><p>Use ArchiMate to stop six squads from drawing six truths. Use ADM to justify why migration is phased. Use Agile to land each plateau while players are still at the table.</p><p>That is EA doing its job: map over slogans, plateaus over big-bang, shared model over private diagrams.</p><p><em>Originally published at </em><a href="https://ranadeepdev.com/archimate-is-not-a-diagram-contest/"><em>https://ranadeepdev.com</em></a><em> on September 12, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4281badc4299" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predictions at High Scale]]></title>
            <link>https://medium.com/@ranadeep.1226/predictions-at-high-scale-9f811a04efe6?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f811a04efe6</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sun, 06 Sep 2026 05:44:43 GMT</pubDate>
            <atom:updated>2026-09-06T17:13:22.239Z</atom:updated>
            <content:encoded><![CDATA[<p>As an Enterprise Architect, I collaborate with business stakeholders and engineering stakeholders all the time. Outcomes, SLAs, capacity, latency, failure modes that rhythm is familiar.</p><p>Data scientists who build the ML algorithms were a different experience in a good way.</p><p>They showed up with business flavour and tech flavour in the same conversation. In one breath simulation accuracy, what churn <em>means</em> for the player, payment and bonus buckets. In the next <strong>XGBoost, Random Forest, sklearn self-learning paths,</strong> training windows on ten years of history. They were not pure business and not pure platform engineering.They sat between and that made the Architecture Review Board (ARB) interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EaLEn758UqRKsu5jvGJSpw.png" /></figure><p><strong>At the ARB we had to translate three worlds into one production decision</strong></p><p><strong>Business—</strong> act while the player is still in session churn capacity and purchase capacity must map to real buckets</p><p><strong>Data science</strong>— 80% simulation accuracy on churn and purchase models demo landed; artifacts ready</p><p><strong>Engineering </strong>— can we execute those models in real time when game actions end, at gaming concurrency, without the prediction arriving after the player left?</p><p>If you are not married with your ML — ML aligned with engineering you will not get results. Not “ML vs engineering.” Not a handoff and goodbye. A marriage analytics owns the models platform owns real-time execution both meet at the seam where game events become predictions and buckets.</p><p>This article is how we built that platform a <strong>Python Prediction Engine</strong> on Flask first, upgraded to FastAPI when concurrent predictions became the bottleneck and what we learned when ML and engineering had to work as one system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQNIZ3AAC-hErVoSS9DyJw.png" /></figure><p><strong>Accuracy is necessary. It is not sufficient.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PXJHuYjOd-bu0GLTCV4MCA.png" /></figure><p>The gap between those columns is architecture and engineering not another week of feature engineering alone.</p><p>That gap closes only when ML and engineering are married, not when one team “finishes” and throws artifacts over the wall the same lesson we learned at the ARB before a line of platform code shipped.</p><p><strong>The business problem: act on the game, not on yesterday’s warehouse</strong></p><p>Players do not churn in batch files. They churn in sessions.</p><p>When a game ends we already know something useful how they played, whether they won, how they bet, how long they stayed. The business wanted to use that moment to</p><p>Estimate churn riskand steer retention offers</p><p>Estimate purchase capacity and place the player in the right payment / bonus bucket</p><p>Do it in real time not after a nightly Spark job</p><p>So the game engine would emit an eventwhenever a relevant game action completed. Our job was to consume that event, call the right model, and return a recommendation the targeting and payments stack could act on.</p><p><strong>That became the Prediction Engine.</strong></p><p>How we designed it: event-driven, command pattern, handler factory</p><p>We designed an event-driven flow:</p><p>Game engine (game ends / action completes)</p><p>→ event on the bus</p><p>→ Prediction Engine consumes</p><p>→ HandlerFactory picks handler by event type</p><p>→ Model inference (churn or purchase)</p><p>→ Response: bucket / offer recommendation</p><p>→ CRM / targeting / payments path</p><p><strong>Command pattern + HandlerFactory</strong></p><p>Not every event should run every model. A game-end event might need a churn handler. A purchase-intent or cash-action event might need a purchase-capacity handler. We used the Command pattern.</p><p>Each event type maps to a handler (a command object)</p><p>A HandlerFactory returns the right handler from the event name / type</p><p>The handler loads features, calls the model, shapes the response</p><p>That kept the engine extensible. New model, new event add a handler and register it in the factory. The game engine stayed dumbemit event, do not know model internals.</p><p>That kept the engine extensible. New model, new event add a handler and register it in the factory. The game engine stayed dumb emit event, do not know model internals.</p><p><strong>Flask v1: ship fast, prove the path</strong></p><p>We built the first version in Python with Flask:</p><p>Simple REST endpoints for health and internal ops</p><p>Consumers pulled work from the messaging layer and invoked handlers</p><p>Gunicorn workers behind a load balancer</p><p>Containerized, load-tested, concurrency tests passed, deployed</p><p>For a while it worked fine. Predictions landed. Buckets updated. The demo became production.</p><p><strong>What broke with Flask under high concurrent predictions</strong></p><p>Load tests passing once is not the same as sustained concurrent predictions at gaming traffic.</p><p>Flask’s default synchronous WSGI model became the ceiling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RVF4Lsvc9zZxsc0XCBf6eA.png" /></figure><p>We were not failing because the models were wrong. We were failing because the serving model one blocking request per worker could not accommodate the concurrency profile once many tables ended games at once.</p><p>Eighty percent accuracy does not help if the prediction arrives after the player left the screen.</p><p><strong>Why we upgraded to FastAPI (and what it actually fixed)</strong></p><p>This is not Flask vs FastAPIas a religion. It is match the framework to the load.</p><p>We moved the Prediction Engine to FastAPI because we needed a better concurrency story at the API and orchestration layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uhVfllka5ROInlKuXarSnw.png" /></figure><p>FastAPI did not make the churn model smarter. It made the platform able to serve many concurrent predictions without worker exhaustion on the hot path.</p><p><strong>What we kept from the Flask design</strong></p><p>Event-driven ingestion — unchanged idea</p><p>HandlerFactory+ Command handlers — unchanged pattern.</p><p>Containerized deployment and autoscaling — still required.</p><p>Models from the analytics team — same artifacts, better house.</p><p><strong>The upgrade was the serving and concurrency layer, not a rewrite of the ML story.</strong></p><p><strong>Thread pools at consumers — and why events still piled up</strong></p><p>Under concurrent load we used thread pools at the message consumers. That was reasonable for v1: each game-end event got a worker thread, the handler ran, features were fetched, XGBoost / RF / sklearn `predict()` executed, the result went out.</p><p>It worked until events piled up.</p><p>When many tables ended games at once, the pattern looked like this:</p><p>Event 1 → thread blocked (feature fetch + predict)</p><p>Event 2 → waits for free thread</p><p>Event 3 → waits</p><p><strong>Queue depth grows → latency grows → buckets arrive too late</strong></p><p>Python’s thread model was part of the pain</p><p>A bounded thread pool caps throughput backlog is inevitable under burst</p><p>Many threads mean memory and context-switch overhead, not free parallelism</p><p>Blocking I/O (RTQE, Cassandra, HTTP) ties up threads while they wait</p><p>CPU-bound `predict()` keeps threads busy for the full inference window</p><p>We were not GPU-bound. We were concurrency-shaped wrong for a burst of single-row tabular scoring.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ohZj8Dtz8gw3bjx0qhwb3g.png" /></figure><p><strong>The async pattern: Uvicorn, event loop, and bounded inference</strong></p><p>The fix was not “more threads.” It was async for waiting, thread pool for predicting.</p><p>We moved the Prediction Engine to FastAPI served by Uvicorn, with uvloop as the event loop where we could — a faster asyncio loop for I/O-heavy work. The pattern:</p><p><strong>async consumer / handler</strong></p><p>await consume event (I/O — event loop handles many in flight)</p><p>await fetch features (I/O — RTQE / cache / HTTP)</p><p>await run_in_executor(predict) (CPU — bounded thread pool, NOT on event loop)</p><p>await ack / publish result (I/O)</p><p><strong>Rules we enforced:</strong></p><p>1. Never call `predict()` directly inside `async def`it blocks the event loop and recreates the pile-up.</p><p>2. Bounded inference pool cap concurrent XGBoost/RF/sklearn calls (semaphore or fixed executor size).</p><p>3. Async for orchestration— consume, fetch, ack; let the loop multiplex I/O.</p><p>4. Scale out — more container replicas when queue depth rises; async is not infinite capacity.</p><p>uvloop did not make the models more accurate. It made the consumer path stop drowning in thread overhead when events stacked up. GPU would not have fixed that either our models are tabular, CPU-native, one player per game end.</p><p>This is the same lesson as on the Java side with virtual threads at RTQE scale match the concurrency model to what actually blocks I/O on the loop, CPU in a pool.</p><p><strong>The full stack picture</strong></p><p>Our models were tabular— not deep learning. The analytics team trained on ten years of history using XGBoost, Random Forest, and sklearn self-learning / incremental models. Simulation accuracy was strong (~80%). Serving them in production was a different shape of problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ejAfwgqjWq5OxyHH6XnTLg.png" /></figure><p>GPU does not improve accuracy for this stack. It can help large-batch deep learning not single-row XGBoost/RF scoring at game end. The bottleneck we hit was concurrent serving(Flask workers), not matrix math on a GPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TTOW8s73in8N3zkQo7OEGg.png" /></figure><p><strong>Flow in production:</strong></p><p>1. Game engine — live table ends; emits event (game end, cash action, …)</p><p>2. Message bus — decouples gameplay from scoring (same event-driven seam as the modular game engines)</p><p>3. Prediction Engine (FastAPI)— consumes event HandlerFactory picks churn vs purchase handler</p><p>4. Feature fetch — live behavioral features from RTQE and related real-time services (often more latency than `predict()`</p><p>5. Model inference (CPU)— handler calls the right XGBoost / RF / sklearn artifact in a thread pool</p><p>6. Response — churn capacity → retention bucket; purchase capacity → payment / bonus bucket</p><p>7. Targeting / CRM / payments— act while the player is still in session</p><p>Features came from the same real-time data path we had already built for segmentation — the Dynamic Real-Time Query Engine and related platform services. Accurate models plus live features plus an engine that could keep up that is when recommendations started to matter in production.</p><p>essons we took to the architecture board</p><p>1. Demo accuracy ≠ production value.Simulation at ~80% is a starting line. Without real-time integration and infra, it is a handoff to nowhere.</p><p>2. Marry ML with engineering — or you will not get results.Separate ownership is fine separate reality is not. Analytics trained on ten years of history; architecture built the event-driven engine, feature path, and serving layer. Neither side wins alone. Handoff without partnership is applause without outcomes.</p><p>3. The ARB is where ML, business, and engineering marry. Data scientists bring business and tech flavour together simulation accuracy <em>and</em> model mechanics. Use the board to ask what must be true in production for the model to count as a result.</p><p>4. Join model team and platform team at the seam. Analytics builds models; architecture builds the event-driven engine that runs them on live game actions together, not in sequence with a six-month gap.</p><p>5. Design for events, not cron.Game-end is a natural trigger. Command + factory keeps new models from polluting the game engine.</p><p>6. Load test the serving path, not just the model.Concurrency tests on Flask passed — until production traffic shape changed. Test concurrent predictions, not one request at a time.</p><p>7. Upgrade frameworks when the bottleneck is serving, not when a blog says so.Flask was the right v1. FastAPI was the right v2 for our concurrency profile.</p><p>8. Async does not fix CPU-bound inference. Run `predict()` in a thread pool or dedicated workers. FastAPI wins on orchestration and I/O, not on magic faster math.</p><p>9. XGBoost / RF / sklearn are CPU-native. Do not reach for GPU to fix accuracy or single-row game-end latency. Optimize the serving layer and feature path first.</p><p>10. Thread pools at consumers are not enough under burst. Use async for I/O(Uvicorn / uvloop) and a bounded pool for `predict()`— never block the event loop with inference.</p><p>When Flask is still fine</p><p>Internal tools, low QPS, batch scoring</p><p>Prototypes and first vertical slice</p><p>Teams that will never see game-end burst concurrency</p><p>When many game actions end at once and payments and bonus buckets must update in session, plan for serving architecture earlynot after the ML demo.</p><p><strong>Wrapping up</strong></p><p>Our ML team did serious work ten years of history, churn and purchase models, ~80% simulation accuracy, a convincing demo. None of that produces player outcomes until architecture gives you a Prediction Engine that</p><p>Consumes game events in real time</p><p>Routes through a HandlerFactory and command handlers.</p><p>Runs models under concurrent load</p><p>Returns payment and bonus bucket recommendations while it still matters</p><p>We started on Flaskcontainerized, load-tested, deployed, working. We moved to FastAPI when high concurrent predictions exposed the limits of synchronous serving.</p><p>Marry ML with engineering. Eighty percent accuracy in simulation is not a result. An event-driven Prediction Engine at gaming concurrency is. Without that marriage models plus platform plus infra you do not get outcomes. You get applause in a meeting room.</p><p>Also read</p><p>If this was useful, continue the Enterprise Architecture thread:</p><p>[Dynamic Real Time Query Engine](<a href="https://medium.com/@ranadeep.1226/dynamic-real-time-query-engine-31ef07b5f2dc">https://medium.com/@ranadeep.1226/dynamic-real-time-query-engine-31ef07b5f2dc</a>) — live features for CRM, ML, and targeting</p><p>[Multithreading ≠ Concurrency](<a href="https://medium.com/@ranadeep.1226/multithreading-concurrency-back-to-basics-with-a-live-game-table-8ad8e9d8ad19">https://medium.com/@ranadeep.1226/multithreading-concurrency-back-to-basics-with-a-live-game-table-8ad8e9d8ad19</a>) — thread starvation at scale on the Java side</p><p>[RabbitMQ and Kafka](<a href="https://medium.com/@ranadeep.1226/rabbitmq-and-kafka-8e43f1b1fa53">https://medium.com/@ranadeep.1226/rabbitmq-and-kafka-8e43f1b1fa53</a>) — event-driven paths on the gaming platform</p><p>[Build vs Buy vs Reuse](<a href="https://medium.com/@ranadeep.1226/build-vs-buy-vs-reuse-a155a3ae111f">https://medium.com/@ranadeep.1226/build-vs-buy-vs-reuse-a155a3ae111f</a>) — when to build the thin platform layer</p><p>[ADM and Agile Complement Each Other](<a href="https://medium.com/@ranadeep.1226/adm-and-agile-complement-each-other-85f7e7fa4ace">https://medium.com/@ranadeep.1226/adm-and-agile-complement-each-other-85f7e7fa4ace</a>) — ship the platform incrementally</p><p>[The ARB Protocol Debate: When to Choose REST, gRPC, GraphQL, or WebSocket](<a href="https://medium.com/@ranadeep.1226/the-arb-protocol-debate-when-to-choose-rest-grpc-graphql-or-websocket-9df9c36a01d3">https://medium.com/@ranadeep.1226/the-arb-protocol-debate-when-to-choose-rest-grpc-graphql-or-websocket-9df9c36a01d3</a>) — same ARB energy: name the conversation before the acronym</p><p><em>If you have shipped ML to production — what broke first: the model, the features, or the serving layer? Drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f811a04efe6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ADM and Agile Complement Each Other]]></title>
            <link>https://medium.com/@ranadeep.1226/adm-and-agile-complement-each-other-85f7e7fa4ace?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/85f7e7fa4ace</guid>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 08:59:34 GMT</pubDate>
            <atom:updated>2026-09-05T08:59:34.997Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Marry the map and the sprint a live gaming platform shows how.</strong></p><p>A lot of people confuse ADM and Agile.</p><p>Sometimes TOGAF practitioners ignore Agile as if a good architecture slide deck ships itself. Sometimes Agile warriors ignore TOGAF as if sprints alone will sort out migration, data ownership, and enterprise governance.</p><p><strong>Both camps lose.</strong></p><p>If you marry both you get something better standard, beautiful results not perfect, but repeatable. Architecture that names <em>what </em>to change and <em>in what order.</em> Delivery that proves <em>each slice</em> before the next. On a live gaming platform, that marriage is not academic. Players, money, and latency do not wait for your methodology debate.</p><p>This article is ADM and Agile not vs. How they complemented each other when we moved from a monolith toward modular game engines, matchmaking and WebSockets, brokers, real-time query, and scale using the Architecture Development Method for the spine and Agile for the heartbeat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*upKKwWOM4Znpyko4eUWeyg.png" /></figure><p><strong>Two words people treat as enemies.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YxLKKtaAhuWLM4C34GLBsw.png" /></figure><p><strong>One line:ADM is the map and the sequence. Agile is the engine. Gaming needs both.</strong></p><p><strong>Why a gaming platform is a honest test.</strong></p><p>High-scale gaming and payments punish half-methods:</p><p>Hot paths — live tables, matchmaking, wallets — cannot wait for a yearly architecture review</p><p>Many squads— lobby, game, transactions, platform — need a shared map or they invent private truths</p><p>Migration is real— monolith → modules → brokers → analytics — not a greenfield fantasy</p><p>Change never stops— new abuse patterns, new playlists, new scale events</p><p>If ADM only works on calm HR portals, it is not Enterprise Architecture. If Agile only works on a single greenfield app, it is not enterprise delivery. A live game platform is where the marriage shows its value.</p><p><strong>ADM phases × Agile — how we paired them (gaming examples)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEHQnEEeszQEvKlFtcudbw.png" /></figure><p><strong>Preliminary + team working agreements</strong></p><p><strong>ADM:principles, scope, who owns architecture decisions.</strong></p><p><strong>Agile: Definition of Ready, squad charters, architecture decision records in the backlog.</strong></p><p>Gaming example: principles we actually enforced — money off the gameplay hot path; one writer per live table; matchmaking as door, WebSocket as room; reuse enterprise events before shadow copies.</p><p>Without this marriage, every squad optimizes locally. RabbitMQ in one place, Kafka in another, REST polls for the game loop and nobody owns the seam.</p><p><strong>Phase A (Vision) + epics</strong></p><p><strong>ADM:business drivers, stakeholders, target state in plain language.</strong></p><p><strong>Agile: product goal, epic, measurable outcomes per quarter.</strong></p><p>Gaming example:Modular monolith so lobby, game, and transactions scale and fail independently without losing live play.” Not “microservices because Netflix.”</p><p><strong>Phases B–D (Business, IS, Technology) + spikes and sprint zero</strong></p><p><strong>ADM: capabilities, application boundaries, technology standards.</strong></p><p><strong>Agile: architecture spikes, thin vertical slices, “sprint 0” for risky unknowns.</strong></p><p>Gaming examples:</p><p>Business: separate gameplay from transactions capability — buy-in cannot block the tick</p><p>Applications:REST matchmaking → assign table → WebSocket for live session.</p><p>Technology:RabbitMQ for work routing on the hot path Kafka later for history and analytics ADM chose <em>when</em> Agile shipped <em>which module first.</em></p><p><strong>Phase E (Opportunities) + PI / roadmap</strong></p><p><strong>ADM: work packages, dependencies, build vs buy vs reuse.</strong></p><p><strong>Agile: prioritized backlog, capacity, dependency ordering across squads.</strong></p><p>Gaming example: offline Spark segmentation ADM framed build vs EMR buy Agile time-boxed the 10-day build proof. Architecture named the tradeoff Agile proved the increment.</p><p><strong>Phase F (Migration) + incremental release</strong></p><p><strong>ADM: transition architecture, coexistence, decommission rules.</strong></p><p><strong>Agile: feature flags, dark launch, strangler slices, no big-bang fantasy</strong>.</p><p>Gaming example: monolith → modular monolith module by moduletransactions off the game process first, then lobby paths, then scale events. Players still at tables while the map moves underneath.</p><p><strong>Phase G (Governance) + retro + ADRs</strong></p><p><strong>ADM: compliance with principles, architecture board, change control.</strong></p><p><strong>Agile: sprint retro, backlog refinement, lightweight Architecture Decision Records.</strong></p><p>Gaming example:Why Hazelcast for coordination and Redisfor leaderboards?logged once CAP tradeoff named so the next squad does not reopen the same fight.</p><p><strong>Phase H (Change management) + continuous delivery</strong></p><p><strong>ADM: the cycle starts again when the business changes.</strong></p><p><strong>Agile:continuous improvement, operational learning.</strong></p><p>Gaming example: fraud patterns, new real-time query consumers, region/zone fleet math new ADM iteration, new Agile quarters — same marriage.</p><p><strong>What the marriage fixed (and vs)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9ZhXVhl0W3p0zBz6cAQHA.png" /></figure><p><strong>Without marriage — TOGAF-only smell.</strong></p><p><strong>18-month target architecture PDF production still on the monolith squads ignore it.</strong></p><p><strong>Without marriage Agile-only smell.</strong></p><p>Six microservices in six sprints three message buses no decommission plan matchmaking polls REST for the game loop.</p><p><strong>With marriage:</strong></p><p>ADM says split gameplay and money and sequence the brokers. Agile ships transaction handoff via RabbitMQ in sprint N, matchmaking REST + WebSocketin sprint N+1, Kafka for BI when the business case is proveneach increment demonstrable at a live table.</p><p><strong>Anti-patterns we said no to.</strong></p><p>ADM once a year, Agile ignores it — architecture becomes wallpaper</p><p>Every sprint reinvents architecture** — no standards, no reuse</p><p>Phase F on a slide, cutover on a panic weekend — players feel it</p><p>We’re Agile, we don’t need stakeholders — Risk, Payments, and Support still exist on gaming platforms</p><p><strong>We’re TOGAF, we don’t need sprints — latency and competitors do not wait</strong></p><p><strong>Wrapping-Up</strong></p><p>A lot of people confuse ADM and Agile Some TOGAF practitioners ignore Agile. Some Agile warriors ignore TOGAF.</p><p>Marry both.</p><p>ADM — <em>what </em>to change, <em>who </em>cares, h<em>ow</em> to migrate, <em>what </em>to govern iteratively</p><p>Agile — <em>what</em> ships this sprint, <em>how</em> we learn, <em>how</em> we improve — iteratively</p><p>On a ive gaming platform, that marriage produced standard, beautiful results — not slide-deck perfection, but map plus motion modular engines, doors and rooms for clients, brokers where they fit, real-time paths that scale, decisions recorded so the next squad does not burn the same fuel.</p><p>ADM is not the enemy of Agile. Agile is not the enemy of ADM. Confusion is the enemy. Marriage is the practice.</p><p><strong>Also read</strong></p><p>If this was useful, continue the Enterprise Architecture thread:</p><p>[TOGAF Is Theory Until You Apply ADM to a Real Problem]</p><p><a href="https://medium.com/@ranadeep.1226/togaf-is-theory-until-you-apply-adm-to-a-real-problem-595e678a1e2e">https://medium.com/@ranadeep.1226/togaf-is-theory-until-you-apply-adm-to-a-real-problem-595e678a1e2e</a></p><p>[From a Garage Monolith to 200,000 Concurrent Players]</p><p><a href="https://medium.com/@ranadeep.1226/from-a-garage-monolith-to-200-000-concurrent-players-6ec0eea86cd6">https://medium.com/@ranadeep.1226/from-a-garage-monolith-to-200-000-concurrent-players-6ec0eea86cd6</a></p><p>[RabbitMQ and Kafka]</p><p><a href="https://medium.com/@ranadeep.1226/rabbitmq-and-kafka-8e43f1b1fa53">https://medium.com/@ranadeep.1226/rabbitmq-and-kafka-8e43f1b1fa53</a></p><p>[Build vs Buy vs Reuse]</p><p><a href="https://medium.com/@ranadeep.1226/build-vs-buy-vs-reuse-a155a3ae111f">https://medium.com/@ranadeep.1226/build-vs-buy-vs-reuse-a155a3ae111f</a></p><p>The ARB Protocol Debate: When to Choose REST, gRPC, GraphQL, or WebSocket]</p><p><a href="https://medium.com/@ranadeep.1226/the-arb-protocol-debate-when-to-choose-rest-grpc-graphql-or-websocket-9df9c36a01d3">https://medium.com/@ranadeep.1226/the-arb-protocol-debate-when-to-choose-rest-grpc-graphql-or-websocket-9df9c36a01d3</a></p><p>[Hazelcast and Redis in Gaming]</p><p><a href="https://medium.com/@ranadeep.1226/we-did-not-pick-one-cache-we-mapped-each-workload-to-cap-9a202470f0c7">https://medium.com/@ranadeep.1226/we-did-not-pick-one-cache-we-mapped-each-workload-to-cap-9a202470f0c7</a></p><p><em>If you’ve lived both sides — TOGAF deck or sprint-only — what broke first when you tried to marry them? Drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85f7e7fa4ace" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We did not pick one cache — we mapped each workload to CAP]]></title>
            <link>https://medium.com/@ranadeep.1226/we-did-not-pick-one-cache-we-mapped-each-workload-to-cap-9a202470f0c7?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a202470f0c7</guid>
            <category><![CDATA[hazelcast]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[cap-theorem]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Fri, 04 Sep 2026 19:49:58 GMT</pubDate>
            <atom:updated>2026-09-04T20:05:23.392Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hazelcast and Redis in Gaming</h3><p><strong>We did not pick one cache — we mapped each workload to CAP</strong></p><p>On a live gaming platform, someone always asks: Hazelcast or Redis?</p><p><strong>As if one logo must win the whole cluster.</strong></p><p>We did not choose that way. After modularizing game engines lobby, game, transactions on their own paths we needed recoverable game state when a node dies, coordination across JVM services, and high-volume leaderboard reads that could tolerate a little lag. Hazelcast and Redis each fit a different CAP shape.</p><p><strong>This article is Hazelcast and Redis — not vs</strong>. How we use a remote Hazelcast distributed cluster for replicated table state and failover, and Redis for leaderboards. CAP is the lens; live tables, pinned game nodes and money kept off the tick are the examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_g5RGd8lnDPdl1e37RqYmw.png" /></figure><p><strong>Architecture, to us, is not picking logos.</strong> It is design, prototypes, and naming tradeoffs out loud. Choose C or A because the business can live with the downside —<strong> CAP is a lens, not a bible.</strong></p><p><strong>CAP in one minute</strong></p><p>When the network misbehaves, distributed systems trade off</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J6UzqYJdIV6mufTdBiMfGQ.png" /></figure><p><strong>P is not optional at scale</strong>. Under partition you pick C (refuse stale / fence / error) or A (keep serving, maybe stale).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*725vcHksnsjd9Q-NQnXQpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fpCRPqhD_Kn7Ujm-LcdVQ.png" /></figure><p><strong>Same company, same platform — different maps, different clusters, different backup settings.</strong></p><p><strong>Our model: pinned node + IMap replica</strong></p><p>We pin one game to one game node That node is the active writer pot, seats, turn, timers single owner, local memory, fast tick.</p><p><strong>Every state-changing action </strong>(fold, call, raise, timer) also replicates a snapshot to Hazelcast `IMap` on a remote cluster with <strong>sync backup</strong>. If the pinned node dies, a new node loads that snapshot and resumes same pot, same turn.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FcuyE9srpi5B8Y0SgQqh0g.png" /></figure><p><strong>Normal action</strong>: local mutate → IMap.set(tableId, snapshot) → broadcast</p><p><strong>Game node dies: </strong>CP lock → new node IMap.get → hydrate → clients reconnect.</p><p>Money still flows queue + DB— not per-action cache ledger.</p><p><strong>Hazelcast: remote distributed cluster (not embedded)</strong></p><p>Dedicated six-member grid. Game / lobby / transaction services are clients only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1PAKd0x_wNv0GdaCr29JMg.png" /></figure><p>[ Game node A — active writer ] ──client──┐</p><p>[ Game node B — failover target ] ──client──┼──► [ Hazelcast cluster ]</p><p>[ Lobby service ] ──client──┘ game state IMap (sync backup)</p><p>routing IMap, CP locks</p><p><strong>Why remote cluster:</strong>scale game fleet independently blast radius tune sync backup on grid nodes game JVM churn does not reshape partitions.</p><p><strong>Jobs we gave Hazelcast</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOAuujvfIVThFRa74SiPzg.png" /></figure><p><strong>CAP justification</strong>: losing a live money table mid-hand, or two nodes serving different pots, is unacceptable → sync backup on game-state `IMap`, CP + fencing on failover.</p><p><strong>What we did not do</strong>: two writers without fencing wallet ledger in HZ async-only zero-backup on game-state maps.</p><p><strong>Redis: leaderboards (AP-leaning)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOAuujvfIVThFRa74SiPzg.png" /></figure><p><strong>Leaderboards are AP-friendly:</strong> show rank #4 when true rank just became 3 beats an empty board. Redis *ZSET, high reads, replica lag OK for display.</p><p><strong>What we did not do</strong>: Redis as sole payout source linearizable global #1 on every read full match simulation in Redis.</p><p><strong>Same platform — different CAP bets</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHx4mWgd_-ZxfkwLqhwMeQ.png" /></figure><p><strong>When things fail</strong></p><p>Game node goes down</p><p>1. Pinned node dies mid-match</p><p>2. One successor acquires CP lock (fences old node)</p><p>3. `IMap.get(tableId)`→ rebuild local state</p><p>4. Routing updated → players reconnect</p><p>5. Resume or void by product rules</p><p>CAP:C on failover— we paid sync replication during play.</p><p><strong>Hazelcast grid member goes down</strong></p><p>1. HZ member loss → backup promotes → short rebalance</p><p>2. Game clients retry `get`/`set`</p><p>3. Replicated game state survives on promoted copy</p><p>Avoid: state living only in one JVM with no recoverable `IMap` copy.</p><p><strong>Anti-patterns</strong></p><p>One cache for everything — CAP differs by workload</p><p>Redis Redlock for table ownership — we used Hazelcast CP + pinned node</p><p>Hazelcast for every leaderboard — Redis ZSET won for AP serving</p><p>Async / zero-backup on game-state `IMap`</p><p>Strong consistency everywhere — unnecessary for presence and ranks.</p><p><strong>Wrapping-Up</strong></p><p>Hazelcast and Redis— not vs.</p><p>Hazelcast— remote cluster: replicated game state in `IMap` (sync backup), routing, CP on failover. Active writer on pinned node; recoverable copy on the grid.</p><p>Redis— leaderboards: available top-N, briefly stale OK.</p><p>CAP: pick C or A per workload. Architecture: design, prototype, name tradeoffs. Sync backup costs latency — we paid it where failure consistency mattered. Replica lag costs perfect ranks — we paid it where availability mattered.</p><p><strong>Draw the workload on CAP first. Then place Hazelcast, Redis, and the game server.</strong></p><p>Also read</p><p>If this was useful, continue the Enterprise Architecture thread:</p><p>[Multithreading ≠ Concurrency]</p><p><a href="https://medium.com/@ranadeep.1226/multithreading-concurrency-back-to-basics-with-a-live-game-table-8ad8e9d8ad19">https://medium.com/@ranadeep.1226single-owner table vs thread-per-player</a></p><p>[RabbitMQ and Kafka]</p><p><a href="https://medium.com/@ranadeep.1226/multithreading-concurrency-back-to-basics-with-a-live-game-table-8ad8e9d8ad19">https://medium.com/@ranadeep.1226/multithreading-concurrency-back-to-basics-with-a-live-game-table-8ad8e9d8ad19</a></p><p>[From a Garage Monolith to 200,000 Concurrent Players]</p><p><a href="https://medium.com/@ranadeep.1226/from-a-garage-monolith-to-200-000-concurrent-players-6ec0eea86cd6">https://medium.com/@ranadeep.1226/from-a-garage-monolith-to-200-000-concurrent-players-6ec0eea86cd6</a></p><p>[Mama, How Would You Design PUBG and Call of Duty?]</p><p><a href="https://medium.com/@ranadeep.1226/mama-how-would-you-design-pubg-and-call-of-duty-848bf91e5396">https://medium.com/@ranadeep.1226/mama-how-would-you-design-pubg-and-call-of-duty-848bf91e5396</a></p><p>[Dynamic Real Time Query Engine]</p><p><a href="https://medium.com/@ranadeep.1226/dynamic-real-time-query-engine-31ef07b5f2dc">https://medium.com/@ranadeep.1226/dynamic-real-time-query-engine-31ef07b5f2dc</a></p><p>[Build vs Buy vs Reuse]</p><p><a href="https://medium.com/@ranadeep.1226/build-vs-buy-vs-reuse-a155a3ae111f">https://medium.com/@ranadeep.1226/build-vs-buy-vs-reuse-a155a3ae111f</a></p><p><em>If your platform debates “Hazelcast or Redis” as one winner — what workload would you map first? Drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a202470f0c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mama, How Would You Design PUBG and Call of Duty?]]></title>
            <link>https://medium.com/@ranadeep.1226/mama-how-would-you-design-pubg-and-call-of-duty-848bf91e5396?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/848bf91e5396</guid>
            <category><![CDATA[multiplayer]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Tue, 01 Sep 2026 11:44:53 GMT</pubDate>
            <atom:updated>2026-09-01T19:39:45.994Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>One day my nephew asked me:</strong></p><p>Mama, you work on games, right? How would you design Call of Duty and PUBG–kind of games?”</p><p>(In our family I am Mama— uncle.)</p><p>He expected a short answer — maps, guns, graphics, maybe a cool explosion.</p><p>I almost said “it’s complicated.” Then I realized he had asked the right question for an architect not <em>how the game looks</em>, but how the system is arranged so players can find a match, stay in sync, and not melt the servers when a whole country logs in after school.</p><p>I answered him the way I wish more design conversations started with a map.</p><p>Not Erangel. Not Verdansk.</p><p><strong>A map of regions, zones, and services.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyyHvvlHbBYV3eIkVys1_w.png" /></figure><p>This article is that answer. It is nota leak of PUBG’s or Activision’s private blueprints. Those backends are not fully public. It is how PUBG-like battle royale and Call of Duty–like multiplayer systems are <em>typically</em> shaped the same vocabulary we use when we design high-scale live games where the player lands, where the match runs, and which services do the work.</p><p><strong>Draw the map before you name a tool</strong></p><p>I drew three boxes for him.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRQ7L5FlnvdO0j5rBPmVrA.png" /></figure><p>Mama’s rule:Players don’t talk to “PUBG” or “CoD.” They talk to a region. Matches run in a zone. Work is done by services.</p><p>If you cannot place a component on that map, you are not designing yet. You are collecting logos.</p><p><strong>Naming trap — three different “zones”</strong></p><p>Kids (and engineers) mix these up:</p><p>1. Cloud / infra zone — failure domain and capacity (this article’s “Zone”)</p><p>2. Map / safe zone— the shrinking circle in a battle royale</p><p>3. Interest / AOI zone — which other players and objects your client needs to know about <em>right now</em></p><p>Same English word. Three layers. Keep them separate or the design review becomes comedy.</p><p><strong>Walk one player from the sofa to the victory screen.</strong></p><p>Here is the journey I walked with him overlaid on the map.</p><p>1. Launch / login→ hits platform services(identity, entitlement). Often multi-region capable, with a home region.</p><p>2. Lobby / party → region-aware presence you queue with friends who share a sensible ping story.</p><p>3. Matchmaking → region-scoped queues (skill, playlist, fill rules). Output “here is your match” + where to connect.</p><p>4. Connect to the match → client is steered to a dedicated game host(or relay path) sitting in a zone inside that region.</p><p>5. In match → authoritative simulation ticks state replication interest management voice often match- or region-local.</p><p>6. Match end → results hand off to progression / inventory / battle pass (platform path not on every bullet).</p><p>7. Side planes (always on) → anti-cheat signals, telemetry, crash reports async, must not block the tick.</p><p>This is the same <em>shape</em>as systems I have lived with in live gaming matchmaking as a door(ask and get placed), then a live channel / dedicated path as the room (stay connected for the session). Different genre. Same map logic.</p><p><strong>What sits where — service placement.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*65M_2Dw6n-0UK3Sq87IItw.png" /></figure><p><strong>Hot path rule: </strong>bullets, movement, and tick authority stay near the player (region / zone). Store, heavy CRM, and batch analytics do not sit on the shot path — same lesson as handing wallet work off a live game loop.</p><p><strong>Same map — different match shape (PUBG-like vs CoD-like)</strong></p><p>I did not crown a winner. Both sit on Region → Zone → Services. The <em>match</em> they host looks different, so the fleet math changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UGYPsy1KrnoCz3e6gj_3ww.png" /></figure><p>And, not vs: PUBG-kind and CoD-kind games are not rival architectures. They are two workloads on one map.</p><p><strong>Region design — what my nephew already understood as “ping”</strong></p><p>Ping budget decides who can share a match comfortably.</p><p>Party constraints beat “perfect MMR” if the squad cannot hear each other in time.</p><p>Empty lobby risk — a region that is too fine-grained never fills too coarse and someone plays on 180 ms.</p><p>Data and policy— some player data and commerce prefer staying in-region.</p><p>Spill / overflow — when a region is on fire, you need a written rule (queue, wait, or rare cross-region with honesty about ping).</p><p>Region is a product decision as much as a cloud dropdown.</p><p><strong>Zone design — why we don’t put every match in one basket.</strong></p><p><strong>Inside a region, zones exist so that:</strong></p><p>Hardware or AZ failure takes some capacity, not all evening matches.</p><p>You can drain live matches (finish or migrate carefully) instead of hard killing everyone</p><p>You scale dedicated fleets in slices — warm pools, playlist packs, BR vs small-modes packing</p><p>If matchmaking returns a host, that host’s zone is part of the placement decision not an afterthought for Ops.</p><p><strong>In-match: who owns the truth</strong></p><p>For both genres, the dedicated (or authoritative) simulation owns match truth positions, damage, win conditions. Clients predict for feel server corrects for fairness.</p><p>That is the same ownership lesson as a live game table many concerns in flight (inputs, timers, broadcasts), but one clear writer of shared state beats a thread per player mutating the pot. Concurrency is required. Chaos is optional.</p><p>Interest management (AOI) decides <em>what </em>to send whom critical on a big BR map, still important in tight CoD lanes. That is game zoning, not your cloud zone.</p><p><strong>“One contest, a million players” — how scale actually works</strong></p><p>This is the question my nephew asked next <em>If a big contest has millions of players, do you build one giant server? When people die, do servers shrink? How does one website send everyone to the right place?</em></p><p>Million players → many matches → autoscale;one domain routes to platform/matchmaking then dedicated host scale down when matches finish player eliminated ≠ destroy server mid-match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TWM6OekW_mHp0yCgqIJw-A.png" /></figure><p><strong>First correction — millions are not one match</strong></p><p>A PUBG-like battle royale match is on the order of 100 players(squads fill seats). A CoD-like mode is often fewer per room.</p><p>A million concurrent players means roughly:</p><p>many regions taking traffic</p><p>huge matchmaking queues</p><p>thousands / tens of thousands of matches in parallel</p><p>each match on a dedicated host (or a packed host running N matches) inside a zone</p><p>So the platform scales by creating many small rooms, not by stuffing a million people into one simulation. One match still has one authoritative world. Parallelism across the system is many matches at once the same idea as many live tables running together.</p><p><strong>Scale up — when the lobby catches fire</strong></p><p>Autoscaling is driven by signals, not vibes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AmlXmd8-JyB65Q-oXZ0Vg.png" /></figure><p><strong>Typical dedicated-fleet pattern:</strong></p><p>1. Keep a warm pool of ready game hosts per region/zone (already loaded build, waiting).</p><p>2. Matchmaking fills a lobby → allocates a host (or a match slot on a packed host) → returns connection info to clients.</p><p>3. If warm pool is empty and queue is deep → scale out more hosts (VM/container/bare metal — product choice).</p><p>4. Cap scale with max so a bug cannot bankrupt you spill to “queue longer” rather than infinite machines.</p><p>Platform and matchmaking scale on HTTP/API metrics. The game fleet scales on matches needing a home.</p><p><strong>Scale down — when the game finishes (not when one player dies)</strong></p><p>When a match ends:</p><p>1. Dedicated host writes results → hands off to progression / rewards (platform).</p><p>2. Players disconnect from that match path.</p><p>3. Host is recycled (back to warm pool) or terminated if pool is fat.</p><p>4. Autoscaler watches idle hosts + queue depth → scale in slowly (hysteresis), so a two-minute lull does not thrash.</p><p><strong>Important:</strong>when players are eliminated mid-match (“next circle, fewer alive”), you usually do not tear down or resize away the dedicated server. The match is still live until a winner (or draw) is declared. What <em>can</em> drop is work inside the match:</p><p>fewer clients to replicate to</p><p>lighter AOI / bandwidth</p><p>fewer voice peers</p><p>The map safe zone shrinks (game rules). The cloud zone fleet shrinks when matches complete and demand falls — different clocks.</p><p>Eliminated players often return to lobby / spectate / platform that traffic moves back to lobby and platform services, while the match host keeps serving survivors.</p><p><strong>One domain — how everyone reaches the right service</strong></p><p>Players remember one name: `play.example.com` or the game client’s embedded API host. Behind that single domain</p><p><strong>Client</strong></p><p>→ DNS (often geo / latency aware) → regional edge</p><p>→ API gateway / load balancer</p><p>-&gt; /auth /store /profile → Platform services</p><p>-&gt; /party /presence → Region-aware social</p><p>-&gt; /matchmaking → Matchmaking</p><p>-&gt; after “match found”</p><p>→ dedicated host or game gateway</p><p>(host:port / token / session from matchmaking — not the store URL)</p><p>So:</p><p>One public front door (domain + gateway) for lobby and platform.</p><p>Matchmaking is the redirector in product terms it tells the client <em>which</em> game service/host owns <em>this</em> match.</p><p>In-match traffic often goes straight to the assigned game endpoint (UDP/dedicated), not through the store cluster.</p><p>Sticky cookies / tokens / session tickets bind this player → this match host for the life of the session.</p><p>That is the same door then room idea REST (or similar) to get placed persistent/realtime path to play.</p><p><strong>What “services change” as the match levels up.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tLg7YTITh7wtpFM0vsWDw.png" /></figure><p>ervices do not randomly morph mid-bullet. Ownership moves along the journey platform → matchmaking → dedicated match → platform again. Autoscaling follows **which layer is busy**, match by match, region by region.</p><p><strong>What not to put on the map’s hot path</strong></p><p>Charging a card on every elimination</p><p>Synchronous “call the data warehouse” mid-fight</p><p>Treating matchmaking REST polls as the game loop</p><p>One global region “because simpler”</p><p>One mega-zone “because Kubernetes”</p><p>Draw the map. Then pick UDP, dedicated hosts, queues, and stores into the boxes — not instead of the boxes.</p><p><strong>Wrapping-Up</strong></p><p>My nephew wanted guns and maps. I gave him regions, zones, and services.</p><p><strong>Region</strong>— where the player belongs for ping and pools.</p><p><strong>Zone </strong>— where this match’s capacity and failure story live.</p><p><strong>Services </strong>— the jobs platform, matchmaking, dedicated simulation, edge, side planes.</p><p>PUBG-kind and Call of Duty–kind games share that map. They differ in match shape and fleet churn, not in inventing a different physics of distributed systems.</p><p><strong>Mama’s rule: </strong>draw the map before you name the tool.</p><p><strong>Mama’s second rule: a million players means many matches and an autoscaler with a warm pool not one infinite server that shrinks every time someone is eliminated.</strong></p><p><strong>One honest caveat: </strong>this design is my assumption a teaching map from how large multiplayer backends are <em>typically </em>shaped, and from patterns I have used in live gaming. It may not be the exact architecture the owners of PUBG or Call of Duty run in production. Their real systems will differ in topology, naming, vendors, and secrets we do not see. Use the map to think do not treat it as a reverse-engineered blueprint.</p><p>When someone asks how you would “design PUBG or CoD,” start with: <em>Which region? Which zone? Which service owns this moment in the player’s journey?</em>Then ask: <em>What signal scales that service up and what event lets it scale down?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=848bf91e5396" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multithreading ≠ Concurrency (Back to Basics with a Live Game Table)]]></title>
            <link>https://medium.com/@ranadeep.1226/multithreading-concurrency-back-to-basics-with-a-live-game-table-8ad8e9d8ad19?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ad8e9d8ad19</guid>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[core-java]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 07:40:28 GMT</pubDate>
            <atom:updated>2026-08-30T07:43:09.576Z</atom:updated>
            <content:encoded><![CDATA[<p>I was in a discussion with a few senior engineers about multithreading and concurrency.</p><p>Most of them carried the same assumptions I hear often concurrency <em>means</em> multithreading more threads means a faster system “concurrent users” means the server must be full of threads if something is single-threaded, it cannot be concurrent. A few reached for bigger pools or virtual threads as if the label alone solved the problem.</p><p>I am not writing this from a pedestal.<strong> I had similar thoughts early in my career.</strong>I treated the words as interchangeable. I reached for threads when what I actually needed was a clearer model of overlapping work and who was allowed to mutate shared state.</p><p>Years of live game tables and high-throughput query paths corrected that the hard way.</p><p><strong>Concurrency</strong> is about <em>how you structure work that overlaps in time</em>. <strong>Multithreading </strong>is one <em>implementation tool</em>. You can be highly concurrent with a single thread. You can run dozens of threads and still get races, starvation, and no real throughput win.</p><p>In this article I separate the terms with a live game table example from high-scale gaming platforms we built — then bridge to the day thread starvation hit us at 100K requests/second on the Dynamic Real-Time Query Engine, and why virtual threads fixed a concurrency <em>cost</em> problem without magically fixing every other one.</p><p><strong>Core concepts. Clear vocabulary. A game you can picture.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrd2UHoYODwV3jKrpEx5nw.png" /></figure><p>One line to keep Concurrency is the <em>problem shape</em>. Parallelism is a <em>performance mode</em>. Multithreading is a <em>mechanism</em>. Don’t say one when you mean another.</p><p><strong>A useful mental model:</strong></p><p><strong>Concurrency </strong>= the kitchen has many orders open at once.</p><p><strong>Parallelism</strong> = two cooks actually chopping at the same moment on two boards.</p><p><strong>Multithreading </strong>= hiring more cooks (or assigning cooks to tickets) which only helps if the kitchen layout doesn’t make them fight over the same knife.</p><p>The game example — one live table</p><p>Picture a live game table (or room): several players seated, a round in progress, money on the line, clients connected over a persistent channel.</p><p>At any moment the server is dealing with <em>overlapping</em> work.</p><p>1. Player inputs— fold, call, raise, buy-in, emoji, reconnect.</p><p>2. Timers — turn clock, sit-out, reconnect grace.</p><p>3. Broadcasts— seat state, pot, winners to everyone at the table.</p><p>4. Side effects— wallet / transaction messages that must not block the game loop forever.</p><p>5. Heartbeats / presence — who is still here</p><p>That list is concurrency. The table <em>must </em>make progress on many concerns that are “in flight” together. Whether you use one thread or twenty is a separate design choice.</p><p>That list is concurrency. The table <em>must</em> make progress on many concerns that are “in flight” together. Whether you use one thread or twenty is a separate design choice.</p><p><strong>What goes wrong if you confuse the words.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KXOa10tQzRVrtv_ZmscylQ.png" /></figure><p><strong>Design A — thread per connection (or per player)</strong></p><p>Idea:each socket/player gets a thread (or a pool worker) that reads input and mutates table state.</p><p>What it buys you</p><p>Familiar mental model (“this thread owns this player”)</p><p>Blocking I/O looks simple in code</p><p>Easy to demo under light load.</p><p>What it costs you on a live table.</p><p>Shared mutable state — pot, seats, turn order — touched by many threads.</p><p>You reach for locks / synchronized / concurrent maps — and still miss ordering bugs.</p><p>Under thousands of connections, **OS threads** are expensive pools saturate queues grow.</p><p>Debugging “who wrote the seat last?” becomes a production incident</p><p>Takeaway: Multithreading <em>implements </em>concurrency here but it also <em>creates</em> a correctness problem you did not have if one thread owned the table.</p><p><strong>Design B — concurrent work, serialized game state.</strong></p><p>Idea: treat the table as an actor(or single-threaded game loop)</p><p>Network I/O may be async or on other threads.</p><p>All <em>*mutations*</em> of table state go through **one queue / one owner thread.</p><p>Timers enqueue events; broadcasts are produced from the same ordered path.</p><p>Heavy or slow work (wallet, Cassandra, analytics) is handed off don’t hold the table lock / loop</p><p>This is still concurrency many concerns overlap. The game logic may be not parallel on purpose.</p><p>What it buys you</p><p>Clear ordering — no two writers invent incompatible seat states</p><p>Easier reasoning in incident review</p><p>Scales with <em>tables</em> and <em>nodes</em>, not with “threads fighting over one pot” .</p><p>What it costs you</p><p><strong>You must design the event model carefully.</strong></p><p>One slow handler on the table thread stalls <em>that </em>table (so keep the critical section thin)</p><p>CPU-heavy work still needs parallel workers <em>off</em> the table path</p><p><strong>Takeaway: Concurrency without multithreading the <em>domain object</em> is often the safer game-server default.</strong></p><p><strong>Where multithreading <em>does</em> earn its keep</strong></p><p>Multithreading (or parallel tasks) is the right tool when work is:</p><p>Independent— no shared mutable game state between units</p><p>-Blocked on I/O or CPU in a way that benefits from overlapping wait or using cores</p><p>Bounded — you know the fan-out and have a backpressure story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DApK_HI6PUis_tgGTEnqEw.png" /></figure><p>So: use threads where the work is embarrassingly parallel or I/O-bound and isolated. Don’t recruit them as a substitute for a clear concurrency model on shared state.</p><p><strong>When “more classic threads” stopped scaling</strong></p><p>On the <a href="https://medium.com/@ranadeep.1226/dynamic-real-time-query-engine-31ef07b5f2dc"><strong>Dynamic Real-Time Query Engine</strong></a>, a behavioral query often touched multiple models*. We mapped the work and ran a path per table with `CompletableFuture` so Cassandra reads overlapped pay roughly the slowest read, not the sum.</p><p>That is concurrency (many reads in flight) implemented with multithreading / async tasks.</p><p>It worked… until traffic climbed toward ~100K requests/second. Latency rose — not because Cassandra was dead, but because of thread starvation. Classic platform threads are scarce. Each concurrent table read wanted an OS thread from a bounded pool. The pool became the bottleneck.</p><p><strong>Java 21 virtual threads</strong> changed the <em>cost model</em> of that concurrency many blocking reads could be in flight without tying up a scarce platform thread each. Starvation eased. Memory and GC pressure rose we tuned with ZGC. Different problem, still real.</p><p>What that night taught us:</p><p>1. We already had concurrency.</p><p>2. Multithreading (classic) was the <em>implementation </em>that hit a wall.</p><p>3. Virtual threads were a better implementation of the <em>same</em> concurrent fan out — not a synonym for “we finally added concurrency.”</p><p>4. Measuring told us the bottleneck was the threading model, not “buy more database.”</p><p><strong>Cheat sheet</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cy_6TwU3TbX_6yNBPpJUmQ.png" /></figure><p><strong>Anti-patterns</strong></p><p>Thread per player mutating the same pot without a clear ownership model.</p><p>synchronized everywhere as architecture.</p><p>Equating concurrent users (product metric) with multithreading (implementation).</p><p>Assuming more threads ⇒ lower latency under shared locks.</p><p>Treating virtual threads as a free pass on backpressure and memory.</p><p>ack to basics:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fhwydYln9MV2q6kApURm_Q.png" /></figure><p><strong>Wrapping-Up</strong></p><p><strong>Back to basics:</strong></p><p>Concurrency means many things are in progress for a live table inputs, timers, broadcasts, money side-effects.</p><p><strong>Parallelism</strong> means work truly runs at the same time for example, running multiple tables in the system across cores or workers.</p><p><strong>Multithreading</strong> is one way to chase either powerful when work is independent, dangerous when everyone writes the same seat map.</p><p>Design the ownership of state first. Then pick the mechanism single-threaded game loop, thread pool, actors, virtual threads, or a broker handoff. Name the drawbacks — races, starvation, GC, stalled table loops so nobody is surprised in production.</p><p><strong>Don’t start with “we’ll multithread it.”</strong></p><p>Start with what must overlap, what must stay ordered, and who owns the write.</p><p><em>When someone says “multithreaded” but means “concurrent,” what clarifying question do you ask first? Drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ad8e9d8ad19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The ARB Protocol Debate: When to Choose REST, gRPC, GraphQL, or WebSocket]]></title>
            <link>https://medium.com/@ranadeep.1226/the-arb-protocol-debate-when-to-choose-rest-grpc-graphql-or-websocket-9df9c36a01d3?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/9df9c36a01d3</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 07:06:38 GMT</pubDate>
            <atom:updated>2026-08-29T17:15:40.236Z</atom:updated>
            <content:encoded><![CDATA[<p>When a new requirement lands, we open the Architecture Review Board (ARB).</p><p>The room fills quickly. Mid-level engineers come prepared and passionate. Someone says “We’ll do gRPC.” Someone else “GraphQL is better for the UI.” Another “Just expose a REST API — everyone knows it.” Occasionally WebSockets enter the chat because “we need real-time.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pY7vIuE8ZZdhNYLcClWa-g.png" /></figure><p>I understand the concern. Everyone is trying to move fast and pick a modern, credible tool.</p><p>But sometimes we miss the fundamentals between all of them.</p><p>gRPC, GraphQL, REST, and WebSocket are not competing logos. They are different communication patterns. They answer different questions about how long the conversation lasts, who is calling, how much of the data the client needs, and what fails when the network gets ugly.</p><p>In this article I explain when to choose which communication pattern, and just as important what the drawbacks of each are. The examples come from high-scale gaming and payments platforms we built matchmaking, live tables, real-time query APIs, and service-to-service paths behind the client.</p><p>Same ARB energy. Clearer criteria.</p><p><strong>What the ARB should ask before naming a protocol</strong></p><p>Before anyone says “gRPC” or “GraphQL,” force these questions.</p><p>1. Is this a short request/response, or a living session?</p><p>2. Is the caller a browser/app, a partner, or an internal service we control?</p><p>3. Does the client need a fixed contract, a flexible read shape, or a stream of events?</p><p>4. Are we optimizing for universality and debuggability, binary efficiency, or push latency?</p><p>5. Who owns versioning when the contract changes?</p><p><strong>REST — when to choose it.</strong></p><p>Choose REST when the interaction is “ask and get an answer” short-lived, resource- or command-oriented, and best served by ordinary HTTP (methods, status codes, gateways, caches).</p><p><strong>Where it fit for us</strong></p><p><strong>Matchmaking</strong> was a scalable REST service. The client called it first The service read live tables/seats from cache, applied rules, and returned game table info (later including a sticky cookie). Only then did the client know where to play.</p><p>The Dynamic Real-Time Query Engine exposed REST APIs so CRM, ML, and targeting could send a behavioral query and get a decision. Request/response. Wide consumer set. Spring Boot + HTTP was the interoperable door.</p><p><strong>Why ARB likes REST (for good reasons)</strong></p><p>Every platform can call it.</p><p>API gateways already know how to auth, rate-limit, and route it.</p><p>Easy to debug (`curl`, logs, status codes).</p><p>Natural for onboarding, config, “place me,” “get segment,” partner integrations.</p><p><strong>Drawbacks</strong></p><p>Chatty UIs — one screen may need many round trips.</p><p>Over-fetching / under-fetching— one DTO rarely fits every client.</p><p>Poor fit as the primary game loop — polling REST for table state is a smell.</p><p>Versioning sprawl— `/v1` `/v2` and bloated payloads if governance is weak.</p><p><strong>gRPC — when to choose it</strong></p><p>Choose gRPC when callers are services inside your trust boundary, you want a strict contract (Protobuf), and you care about efficiency, deadlines, and codegen.</p><p>Where it fits in stacks like ours</p><p>Client-facing traffic stayed REST + WebSocket. gRPC earns its keep service-to-service.</p><p>High-QPS internal lookups (profile, features, decision helpers).</p><p>Strong typing across languages.</p><p>Unary or streaming RPCs without inventing a private framing protocol.</p><p>A fraud Decision API or internal RTQE neighbor might speak gRPC internally while broader consumers still see REST.</p><p><strong>Why ARB likes gRPC</strong></p><p>Compact binary payloads strong performance story.</p><p>Contract-first with breaking-change discipline.</p><p>Deadlines, status codes, streaming built in.</p><p>Excellent for polyglot microservices you own.</p><p><strong>Drawbacks</strong></p><p>Browsers are awkward— need grpc-web or a proxynot “just fetch”</p><p>Ops complexity— HTTP/2 load balancing, observability, and client libraries must be mature.</p><p>Less human-debuggable than JSON REST in a pinch.</p><p>Overkill for simple public or partner APIs.</p><p>False comfort a `.proto` does not replace product thinking about failure modes.</p><p>ARB line: gRPC for internal contracts. Do not force it to the client because it feels advanced.</p><p><strong>WebSocket — when to choose it</strong></p><p>Choose WebSocket when you need a persistent, bidirectional channel server push, client push, session as long as the user is inside an experience.</p><p><strong>Where it fit for us</strong></p><p>Gameplay was never REST polls. Early on, clients held a persistent socket for the life of the session input in, broadcast out.</p><p>Later we moved to WebSockets behind an API gateway (auth, security, rate limits, routing).</p><p><strong>Flow:</strong></p><p>1. REST matchmaking → table info + sticky cookie.</p><p>2. WebSocket through the gateway → live game path.</p><p>3. Stay connected for the session; server fans out state.</p><p>Historically we also separated lobby vs game connections so browsing spikes did not punish a live table.</p><p><strong>Why ARB likes WebSocket</strong></p><p>True real-time without fake polling.</p><p>Efficient for many small messages after handshake.</p><p>Matches how games, live ops, and collaborative UIs actually work.</p><p><strong>Drawbacks</strong></p><p>Operational hardness— sticky sessions, reconnect storms, heartbeats, backpressure.</p><p>Gateway and LB behavior become architecture — not an afterthought.</p><p>Horizontal scale is non-trivial — affinity, failover, “who owns this gameId?</p><p>Abuse risk— open sockets are a DoS surface if rate limits and auth are weak.</p><p>Wrong tool for one-shot CRUD — login and “get config” do not need a socket.</p><p><strong>ARB line:</strong>Use REST (or similar) to enter the room. Use WebSocket to live in the room.</p><p><strong>GraphQL — when to choose it</strong></p><p>Choose GraphQL when many clients need different shapes of the same domain, and REST over/under-fetching is slowing product teams and you are willing to govern a schema.</p><p><strong>Where it fits</strong></p><p>BFF / app / admin / CRM consoles screens that would otherwise need five REST calls or one monstrous DTO.</p><p>Where I push back hard</p><p>Hot game loops— use WebSocket state sync, not GraphQL as the table protocol.</p><p>Simple commands— REST is clearer.</p><p>Blind “GraphQL everywhere”— schema sprawl is an enterprise debt.</p><p><strong>Why ARB likes GraphQL</strong></p><p>Clients ask for exactly the fields they need.</p><p>One endpoint can serve many UI variants.</p><p>Strong story for mobile and parallel frontends.</p><p><strong>Drawbacks</strong></p><p>N+1 and resolver cost — easy to create accidental database storms.</p><p>Caching is harder than REST resource URLs.</p><p>Authz must be field-aware— coarse gateway auth is not enough.</p><p>Schema governance — without owners, GraphQL becomes a junk drawer.</p><p>Subscriptions ≠ free real-time architecture — still need backplane thinking.</p><p>ARB line: Choose GraphQL for read-shape flexibility. Do not choose it to avoid designing APIs.</p><p><strong>Side-by-side: pattern vs backdrop</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Wj8Zt0i-ikB0PNnUg-41w.png" /></figure><p><strong>How we composed them (what “good” looked like)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*ptTNV5h6oHwsbN78Uo0rIg.png" /></figure><p><strong>Brokers (RabbitMQ / Kafka) </strong>are not substitutes for these four. APIs and sockets are conversations. Brokers are time-decoupled work and events. Mature platforms use both on purpose.</p><p><strong>What I say in the ARB when the suggestions fly</strong></p><p>When someone says “we’ll do gRPC / GraphQL / REST,” I translate:</p><p><strong>REST </strong>— “We need a door everyone can knock on.”</p><p><strong>WebSocket </strong>— “We need a room that stays open and pushes.”</p><p><strong>gRPC</strong> — “Two services we own need a tight, fast contract.”</p><p><strong>GraphQL </strong>— “Many UIs need many shapes of one graph — and we will govern the schema.”</p><p><strong>If the sentence is only “it’s modern,” that is not an architecture decision.</strong></p><p><strong>Wrapping-Up</strong></p><p><strong>In the ARB, mid-level energy is valuable. Protocol fashion is not.</strong></p><p>Sometimes we miss the funda: REST, gRPC, GraphQL, and WebSocket solve different communication problems, and each brings drawbacks you must budget for chattiness, connection ops, browser proxies, schema and resolver risk.</p><p>When a new requirement opens the board, don’t start with the acronym. Start with the conversation type. Then choose the pattern. Then name the backdrops out loud so nobody is surprised in production.</p><p>Enter with REST when you need a door.</p><p>Stay with WebSocket when you need a room.</p><p>Speak gRPC when services need a tight contract.</p><p>Offer GraphQL when many UIs need many shapes — and you will own the schema.</p><p><em>If your ARB debates protocols before conversation type, what question do you ask first? Drop a comment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9df9c36a01d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TOGAF Is Theory Until You Apply ADM to a Real Problem]]></title>
            <link>https://medium.com/@ranadeep.1226/togaf-is-theory-until-you-apply-adm-to-a-real-problem-595e678a1e2e?source=rss-bb962f1add15------2</link>
            <guid isPermaLink="false">https://medium.com/p/595e678a1e2e</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[togaf]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <dc:creator><![CDATA[Ranadeep Tujala]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 09:44:28 GMT</pubDate>
            <atom:updated>2026-08-23T18:28:35.152Z</atom:updated>
            <content:encoded><![CDATA[<p>As a TOGAF practitioner, I hear the same complaint often TOGAF is too theoretical.</p><p><strong>That is only half true.</strong></p><p>TOGAF looks heavy when you study it as a framework. When you apply it the right way, especially through the <strong>Architecture Development Method</strong> (ADM), it becomes surprisingly simple and practical. Whenever a complex business problem lands on your desk, try following ADM. It does not give you magic answers it gives you a clear picture what matters, who owns it, what to build, what to govern, and what to change next.</p><p>In this article, I map a real-time fraud engine we built for high-scale gaming and payments onto ADM not as a certification exercise, but as a working method.</p><p>TOGAF ADM applied to a real-time fraud engine Preliminary through Phase H with requirements at the center signal → detect → decide → case → learn contrast of without ADM vs with ADM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4j4TVnydxWcLpCVGUbKLCw.png" /></figure><p><strong>Why a real-time fraud engine is a good ADM proving ground</strong></p><p>High-scale gaming and payments are a bad place for vague architecture.</p><p>Business risk is immediate (loss, chargebacks, regulatory heat, player trust).</p><p><strong>Stakeholders disagree on “success” (risk wants catch-rate product wants low false positives; ops wants explainability finance wants cost).</strong></p><p>Decisions sit on <strong>hot paths </strong>game and wallet flows cannot wait for a leisurely batch job.</p><p>Data is everywhere (events, payments, device, behavior, cases) and late or wrong data becomes wrong blocks.</p><p><strong>Buy vs build vs reuse</strong> shows up hard (vendor fraud suites vs in-house rules/ML vs shared event platforms).</p><p>Change never stops (new abuse patterns weekly). Phase H is not optional poetry.</p><p>If ADM only works on calm greenfield HR portals, it is not Enterprise Architecture. A real-time fraud engine is the stress test.</p><p><strong>ADM in one sentence (before we use it)</strong></p><p>ADM is an iterative method to move from “why are we changing?” to “what must be true in business, data, applications, and technology?” to “how do we deliver and govern without lying to ourselves?”</p><p>You do not need every artifact. You need every phase question answered well enough to decide.</p><p><strong>Preliminary Phase — get permission to architect, not just to code</strong></p><p>ADM question: Are we allowed to run architecture as a controlled change, with principles and scope?</p><p>For a real-time fraud engine, Preliminary is where enterprises usually skip and later regret.</p><p>What we fixed here:</p><p><strong>Architecture principles </strong>the engine must obey (examples prefer explainable decisions on player-facing blocks no silent irreversible wallet actions without audit reuse enterprise event sources before inventing parallel telemetryprotect PII in case files protect hot-path latency budgets).</p><p><strong>Org touchpoints</strong>:Risk, Payments, Customer Support, Legal/Compliance, Game/Product, Data Platform, Security.</p><p><strong>Repository / decision log</strong>: fraud architecture decisions are recorded, not trapped in Slack.</p><p><strong>Scope fence</strong>: this cycle is “real-time fraud decisioning and case workflow for online play and payments” — not “boil the ocean AML + KYC + every analytics dashboard.”</p><p>Without Preliminary, every squad invents private fraud truth. ADM starts by making the fraud engine an enterprise concern.</p><p><strong>Phase A — Architecture Vision name the pain and the target state in business language</strong></p><p>ADM question: What problem are we solving, for whom, and what does success look like?</p><p>Fraud conversations love tools. Phase A refuses tools first.</p><p>Drivers we made explicit</p><p>Abuse and payment fraud leaking into loss and support load</p><p>Real-time game and wallet paths needing decisions in tight latency budgets</p><p>Investigators needing a case trail, not only a model score</p><p>High-scale concurrency peak play and payment bursts, not demo traffic</p><p>Management wanting to avoid unbounded third-party fraud-platform cost where an in-house + selective-buy mix is defensible</p><p><strong>Vision statement (shape we aligned on)</strong></p><p>A real-time fraud engine that consumes trusted enterprise events, decides with rules and models under clear SLAs on gaming and payment hot paths, opens explainable cases, and improves continuously without a second shadow data estate.</p><p><strong>Stakeholders and concerns</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*WtCz3FIjapTn-bNNqJjXMw.png" /></figure><p>Phase A outputs a vision stakeholders can argue with. If they only argue about vendor logos, you are still in sales mode, not ADM.</p><p><strong>Phase B — Business Architecture how fraud work actually runs</strong></p><p>ADM question:What business capabilities, value streams, and processes must change?</p><p>For a real-time fraud engine, Business Architecture is the difference between a model demo and an operating model.</p><p><strong>Capabilities we mapped</strong></p><p>Signal intake- player, session, payment, device, bonus, gameplay events</p><p>Detection — rules, velocity, graph/collusion signals, ML scores</p><p>Decisioning — allow / challenge / hold / block / step-up (sync on hot paths)</p><p>Case management — queue, investigate, evidence, disposition</p><p>Feedback — confirmed fraud / false positive back into rules and training</p><p>Reporting — loss, funnel, SLA, auditor views</p><p><strong>Value streams (simplified)</strong></p><p>1. Live play / payment → real-time risk check → decision → continue or friction</p><p>2. Post-event review → enrichment → case → action</p><p>3. Analyst improvement → pattern found → rule/model change → governed release</p><p><strong>Baseline vs target (business)</strong></p><p><strong>Baseline</strong>: fragmented checks in payment and game services tribal knowledge weak case continuity vendor tools overlapping enterprise data</p><p><strong>Target:</strong> shared real-time fraud capability clear RACI between risk ops and engineering decision SLAs by channel feedback loop owned</p><p><strong>If Phase B is skipped, “fraud AI” projects optimize the wrong verbs.</strong></p><p><strong>Phase C — Information Systems Architecture (Data + Applications)</strong></p><p>ADM question: What data and applications realize those capabilities?</p><p>Data Architecture</p><p>Canonical risk events aligned to enterprise event models (game + payment + identity signals)</p><p>Feature / profile for real-time attributes (velocity, device reputation, linked accounts)</p><p>Decision and reason codes as first-class data (not log line archaeology)</p><p>Case and evidence store with retention and access control</p><p>Label / outcome data for model and rule learning</p><p><strong>ADM forces a hard line</strong>: the fraud engine does not get a private parallel universe of “almost the same” player events. Reuse enterprise data products build fraud-specific semantics on top.</p><p><strong>Application Architecture</strong></p><p><strong>Application Architecture building blocks</strong>: Decision API, detection workers, rules and policy, model scoring, case management, admin/simulation, and integration adapters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*RZktVAtUmqNt0YgrJfe4AQ.png" /></figure><p>Baseline often shows rules hard-coded inside payment or game services. Target separates decisioning from channel apps so high-scale gaming and payments call one fraud engine instead of each inventing one.</p><p><strong>Phase D — Technology Architecture make non-functionals boringly explicit</strong></p><p>ADM question: What technology standards and patterns meet the SLAs?</p><p>For a real-time fraud engine, NFRs <em>are </em>the architecture:</p><p><strong>Latency </strong>— hot-path decision budget on game and payment calls</p><p><strong>Availability</strong>— fail-open vs fail-closed policy by transaction type (a conscious business choice)</p><p><strong>Throughput </strong>— peak concurrent games and payment bursts</p><p><strong>Auditability</strong>— every material decision replayable</p><p><strong>Security</strong>— least privilege on cases; encryption; secrets</p><p><strong>Observability </strong>— decision metrics, drift, queue age, false-positive rate</p><p><strong>Technology patterns that fit this class of engine:</strong></p><p>Event backbone already in the enterprise</p><p>Low-latency decision service horizontally scaled</p><p>Stream/nearline enrichment without blocking the sync path</p><p>Datastores fit to access patterns (profiles vs cases vs features)</p><p>Isolation of model runtime from rule runtime so one failure mode does not blind both</p><p>Phase D is where buy/reuse/build returns vendor case tools might be buy event bus reuse decision service build. ADM does not mandate build. It mandates fit.</p><p><strong>Phase E — Opportunities &amp; Solutions packages, not wishlists</strong></p><p>ADM question: What solution building blocks and work packages close the gap?</p><p>We grouped work so delivery could breathe:</p><p>1. Foundation — decision API, reason codes, audit log, adapters (payment + one game path)</p><p>2. Detection depth — velocity rules, device/link signals, model score integration</p><p>3. Case ops — investigator workflow, evidence attach, disposition codes</p><p>4. Intelligence loop— features, backtest harness, governed rule/model release</p><p>5. Decommission— retire duplicate checks and overlapping vendor modules</p><p>Each package has dependencies and a business outcome. “Big bang fraud rewrite” is not a Phase E output. It is a resignation letter.</p><p><strong>Phase F — Migration Planning sequence risk reduction</strong></p><p>ADM question:In what order do we move, with what transitional architectures?</p><p>Real-time fraud migration is dual-run friendly if you design it</p><p>Shadow mode: new engine scores beside old checks compare</p><p>Dark launch: decide but do not enforce on selected cohorts</p><p>Enforce on lower-blast-radius payment types first</p><p>Expand to hotter game paths when false-positive SLAs hold</p><p>Keep break-glass override with support/risk RACI</p><p>Roadmap is calendar + risk, not only story points. ADM Phase F makes that respectable in front of finance and risk leadership.</p><p><strong>Phase G — Implementation Governance architecture is a gate, not a spectator</strong></p><p>ADM question: Are delivery teams implementing the architecture we agreed?</p><p>Governance checks that mattered for our engine</p><p>New channel cannot embed local fraud ifs — must call the Decision API</p><p>Reason codes required for player-facing friction</p><p>Fail-open/closed matches policy matrix</p><p>Hot-path latency budgets are measured, not assumed</p><p>PII in cases classified and retained correctly</p><p>Model/rule changes go through simulation evidence</p><p>Without G, ADM becomes a kickoff deck. With G, ADM becomes how the enterprise stays honest.</p><p><strong>Phase H — Architecture Change Management: fraud never sits still</strong></p><p>ADM question: How do we respond when the enemy changes tactics?</p><p>Fraud is adversarial. Phase H is continuous:</p><p>Monitoring abuse pattern shifts and model drift</p><p>Intake for new typologies from investigators</p><p>Architecture runway for new signals (new payment rail, new game type)</p><p>Re-entry to earlier ADM phases when the vision or capability map breaks</p><p>If your TOGAF practice has no Phase H operating rhythm, you certified a museum.</p><p><strong>Requirements Management </strong>— the center that a fraud engine will flood</p><p>Every phase dumps requirements into a managed set latency, explainability, retention, jurisdictions, payment-scheme rules, player-experience limits, audit.</p><p>ADM’s center is not bureaucracy. It is how you stop a single loud incident from silently rewriting enterprise principles.</p><p><strong>What applying ADM changed</strong></p><p>What applying ADM changed: without ADM versus with ADM on the real-time fraud engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*VRkT6lc2uFiStdEKogRzog.png" /></figure><p>TOGAF did not give us the fraud engine. ADM gave us a way to decide and sequence one for high-scale gaming and payments.</p><p><strong>How to steal this for your next Architecture Board</strong></p><p>1. Pick a real problem with enemies, regulators, or revenue on the line.</p><p>2. Walk A→H as questions, not as mandatory 40-deliverable cosplay.</p><p>3. Write principles in Preliminary before tool shortlists.</p><p>4. Force Business Architecture before ML heroics.</p><p>5. Make fail-open/closed latency, and explainability explicit in Technology Architecture.</p><p>6. Package E/F so risk shrinks every release.</p><p>7. Keep G/H alive or admit you only did waterfall with extra shapes.</p><p><strong>Whenever a complex business problem lands on your desk, try following ADM. It will not hand you magic answers. It will hand you a clear picture.</strong></p><p><strong>Wrapping-Up</strong></p><p>TOGAF looks heavy when you study it as a framework. It becomes simple when you apply ADM to something that can hurt the business.</p><p>For us, that something was a real-time fraud engine for high-scale gaming and payments. Stakeholders, capabilities, data, applications, technology, migration, governance, and change under adversarial load.</p><p>Theory becomes useful the day you stop redrawing the ADM crop circle and start answering its questions against a working method.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=595e678a1e2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>