I wanted to test an architecture question in production: can you keep customer data strictly isolated inside regional vaults (for data residency and a small blast radius) and still trace multi-hop graph relationships across regions in milliseconds, without a central database?
Cross-border payment networks are a natural stress test for that trade-off. Data residency laws require customer records to stay inside national boundaries, while financial crime crosses those boundaries on purpose. A laundering ring opens a shell company in Zurich, shares a device fingerprint with an account in Singapore, and settles through a beneficiary in London. Put everything in one global graph database and you break residency while turning a regional incident into a global outage. Lock each region inside an isolated silo and investigators lose sight of the ring the moment money crosses a border.
To explore a third option, I built Tanis ↗: twelve isolated regional vaults on Cloudflare SQLite Durable Objects, 6 KB Counting Bloom Filters at the edge, and Oxigraph compiled to WebAssembly running SPARQL 1.1 right inside the browser.
A 56-second architecture walkthrough of Tanis (watch on YouTube): regional isolation, Bloom-filtered edge routing, and in-browser SPARQL.
1. Strict regional isolation does not require slow cross-region fan-out
Tanis partitions a global AML knowledge graph into twelve regional cells (us-east, eu-fra, ch-zrh, sg-sin, and eight others). Each vault runs inside its own Cloudflare SQLite Durable Object (RegionCellDO) with no shared tables behind them.
Every vault stores its local RDF graph across SPO, POS, and OSP indexes and validates every incoming write against an explicit AML ontology (Account, Person, ShellCompany, Device, Transfer, ExternalRef, and Alert). Because each jurisdiction owns its compute and storage together, fault injection and live evacuation stay bounded to the cell you touch. In the live workbench, you can inject latency or a hard failure into one vault and see degraded partial results with the missing region named explicitly, or evacuate a vault to another region with SHA-256 integrity verification.
The hard part of cell-based architecture is never isolation. It is cross-cell lookup. If a router has to ask all twelve regions on every entity lookup, tail latency tracks the slowest region on the planet.
Instead, each vault publishes a compact 6 KB Bloom filter summary to the edge. On a read, the edge router checks the twelve filters locally in memory and only contacts the vaults that might hold the entity.
How the Bloom filters stay fresh and accurate
The first question any distributed systems engineer asks about Bloom routing is how the edge filters stay fresh: standard Bloom filters cannot handle deletes cleanly, and a stale copy of a filter during a write burst will miss newly added links.
Tanis handles that in three pieces:
- Reference-counted 4-bit Counting Bloom Filters (
m = 48,000bits,k = 7hashes via Kirsch-Mitzenmacher double hashing overSHA-256(pepper || iri)): Unlike a standard Bloom filter, reference counting lets each vault handle deletes and live vault evacuations cleanly without leaving stale bits behind. - Monotonic version fencing: Each vault projects its counting filter into a 6 KB binary summary and sends it to a routing coordinator (
DirectoryDO) tagged with monotonic(generation, filterEpoch)tokens, so delayed or out-of-order updates can never overwrite newer state. - Write-coalescing via Durable Object Alarms: During bulk seeding, publishing every vault update straight to Cloudflare KV hit KV’s one write per second per-key limit, triggering
429throttling and leaving readers with stale routing filters that did miss new links. Moving KV publication behind a Durable Object Alarm with a 1,100 ms cooldown absorbed burst writes cleanly and brought missed links back to zero.
Measured on Cloudflare’s edge
To verify that Bloom routing never drops a cross-border link, I ran a 39-query dual-mode benchmark against the live deployment (4,633 graph facts across twelve regional vaults), comparing Bloom-routed edge lookups against asking all twelve regions on every query:
| Metric | Bloom-routed (edge KV snapshot) | Asking all 12 regions |
|---|---|---|
| Median lookup latency (P50) | 7.0 ms | 54.0 ms |
| Mean lookup latency | 18.5 ms | 65.3 ms |
| Tail lookup latency (P95) | 70.0 ms | 110.0 ms |
| Regions skipped per query (average) | 95.5% | 0% |
| Missed links vs. asking all 12 regions | 0 (100% identical results) | 0 |
| Unnecessary region checks on absent entities | 0.00% | N/A |
A Bloom filter is allowed to occasionally ask one extra vault to double-check a candidate entity, which costs a small amount of work and preserves correctness. What it cannot do is silently skip a vault that holds a real match. Across every seeded fraud ring and probe, recall matched querying all twelve regions with zero missed links while skipping 95.5% of regions on average.
2. Once the active subgraph is small enough, the browser can run the queries itself
Once the edge prunes the irrelevant vaults and returns the active fraud-ring subgraph (66 facts hydrated in 4.4 ms), Tanis hands that slice to Oxigraph ↗ compiled to WebAssembly right inside the browser.
From there, investigators can run arbitrary SPARQL 1.1 queries locally in roughly 0.6 ms with zero extra server round-trips.
That split turned out to be the most reusable idea in the whole project: prune globally at the edge, hydrate a small frozen subgraph once, and run a deterministic WASM query engine on the client.
None of the ingredients are new on their own: DuckDB-WASM runs range-sliced analytics in the browser, local-first sync engines (ElectricSQL, PowerSync) replicate scoped slices to SQLite-WASM, and federated RDF systems like Linked Data Fragments and Comunica use Bloom filters to prune remote endpoints. What makes this combination interesting is bringing those ideas onto strictly isolated regional cells with no central database behind them.
It gives you two advantages at the same time:
- Lower backend cost and faster interaction: Ad-hoc exploratory queries are usually what wreck shared graph databases and tail latency. Shifting them to an embedded client engine (Oxigraph WASM, DuckDB-WASM, or SQLite-WASM) eliminates network round-trips and keeps regional vaults light. You also build faster: instead of maintaining dozens of custom filter endpoints and read replicas, you ship one narrow API that returns the relevant neighborhood and let the local query engine handle every follow-up view.
- Deterministic, snapshot-consistent answers: Every follow-up query runs over the exact same frozen slice with deterministic query semantics, rather than hitting a live mutating store or re-prompting an LLM and hoping two runs agree.
Where this pattern applies beyond fraud detection
This pattern fits any system where the global dataset is large or strictly partitioned, yet a single user’s working context is a small neighborhood (hundreds to tens of thousands of facts):
- Regulated and cross-tenant investigation tools (AML, legal e-discovery, insurance claims, supply-chain provenance): Keep records strictly isolated by jurisdiction or customer. When an investigator opens a case, hydrate only the linked slice locally so they can run dozens of ad-hoc follow-ups in under a millisecond over a frozen, auditable snapshot without hammering production vaults.
- Verifiable AI and neuro-symbolic copilots: Instead of re-prompting an LLM on every follow-up question (slow, expensive, and non-deterministic), hydrate the retrieved facts into a client-side graph engine once. Every citation check, path check, or constraint check runs deterministically in under a millisecond against the exact same snapshot, and the model only narrates verified results.
- Permission, lineage, and dependency explorers (authz graphs, data catalogs, CI and build graphs): Global dependency or access graphs can have millions of edges, yet debugging one user’s access path or one broken dataset only touches a few hops. Hydrating that slice locally turns heavy enterprise explorers into instant, zero-server-cost interactive workbenches.
- Offline-first and privacy-sensitive personal tools: Once a user’s scoped slice is loaded (or extracted locally on device, as in Lore), filtering, querying, and verifying happen completely client-side with zero recurring compute cost and reproducible offline behavior.
Where the pattern does not fit is just as clear: if a workload genuinely needs full-graph aggregations across millions of records at once (like training a global model or computing whole-network centrality), you cannot shrink it into a browser slice. The sweet spot is neighborhood-scoped exploration.
Explore it yourself
The live deployment runs on Cloudflare Workers and Durable Objects, and the full source code (Workers runtime, ontology, Python pyoxigraph verification harness, and React workbench) is on GitHub:
- Live workbench: tanis.thebes-labs.workers.dev ↗
- Source code and architecture notes: github.com/mlescaille/tanis ↗