ArcFlow
Company
Managed Services
Markets
  • News
  • LOG IN
  • GET STARTED

OZ brings Visual Intelligence to physical venues, a managed edge layer that lets real-world environments see, understand, and act in real time.

Talk to us

ArcFlow

  • World Models
  • Sensors

Managed Services

  • OZ VI Venue 1
  • Case Studies

Markets

  • Sports
  • Broadcasting
  • Robotics

Company

  • About
  • Technology
  • Careers
  • Contact

Ready to see it live?

Talk to the OZ team about deploying at your venues, from a single pilot match to a full regional rollout.

Schedule a deployment review

© 2026 OZ. All rights reserved.

LinkedIn
ArcFlow Docs
Get Started
  • Get Started
  • Quickstart
  • Installation
  • Project Setup
  • Platforms
  • Bindings
  • Licensing
  • Pricing
Capabilities
  • Vector Search
  • Graph Algorithms
  • Sync
  • MCP Server (AI Agents)
  • Live Queries
  • Programs
  • Temporal
  • Spatial
  • Trusted RAG
  • Behavior Graph
  • Agent-Native
  • Event Sourcing
  • GPU Acceleration
  • Intent Relay
Concepts
  • World Model
  • Graph Model
  • Query Language (GQL)
  • Graph Patterns
  • SQL vs GQL
  • Parameters
  • Query Results
  • Persistence & WAL
  • Error Handling
  • Observations & Evidence
  • Confidence & Provenance
  • Proof Artifacts & Gates
  • Skills
GQL / WorldCypher
  • Overview
  • MATCH
  • WHERE
  • RETURN
  • OPTIONAL MATCH
  • CREATE
  • SET
  • MERGE
  • DELETE
  • REMOVE
  • WITH
  • UNION
  • UNWIND
  • CASE
  • Spatial Queries
  • Temporal Queries
  • Algorithms Reference
  • Triggers
Schema
  • Overview
  • Indexes
  • Constraints
  • Data Types
Functions
  • Built-in Functions
  • Aggregations
  • Procedures
  • Shortest Path
  • EXPLAIN
  • PROFILE
Skills
  • Overview
  • CREATE SKILL
  • PROCESS NODE
  • REPROCESS EDGES
Operations
  • CLI
  • REPL Commands
  • Snapshot & Restore
  • Server Modes & PG Wire
  • Persistence
  • Import & Export
  • Docker
  • Architecture
  • Cloud Architecture
  • Sync Protocol (Deep Dive)
Guides
  • Agent Integration
  • World Model
  • Graph Model Fundamentals
  • Trusted RAG
  • Using Skills
  • Behavior Graphs
  • Swarm & Multi-Agent
  • Migration Guide
  • Filesystem Workspace
  • From SQL to GQL
  • ArcFlow for Coding Agents
  • Data Quality & Pipeline Integrity
  • Code Intelligence
Tutorials
  • Knowledge Graph
  • Entity Linking
  • Vector Search
  • Graph Algorithms
Recipes
  • CRUD
  • Multi-MATCH
  • MERGE (Upsert)
  • Full-Text Search
  • Temporal Queries
  • Batch Projection
  • GraphRAG
Use Cases
  • Agent Tooling
  • Knowledge Management
  • RAG Pipeline
  • Fraud Detection
  • Sports Analytics
  • Grounded Neural Objects
  • Behavior Graphs
  • Autonomous Systems
  • Digital Twins
  • Robotics & Perception
Reference
  • TypeScript API
  • GQL Conformance
  • Compatibility Matrix
  • Glossary
  • Data Types
  • Operators
  • Error Codes
  • Known Issues

Sync

The full persistent world model — spatial positions, temporal history, confidence scores, observation classes — runs locally and replicates to cloud automatically. Local operations are instant: no round-trip, no network dependency, no blocking. Sync is eventual, conflict-resolved by confidence and temporal precedence, and resumable. The local world model stays authoritative. Cloud stays consistent. Multiple agents can each maintain their own local world model and converge on shared state without central coordination.

Local instance              Cloud
┌──────────────────┐  HTTPS  ┌──────────────────┐
│ Browser (WASM)   │────────→│ ArcFlow Cloud    │
│ Node.js process  │←────────│                  │
│ Edge device      │  sync   │ Persistent graph │
└──────────────────┘         └──────────────────┘

How it works#

Every mutation is captured in a sync WAL (write-ahead log). The sync engine pushes WAL entries to the cloud and pulls remote changes back.

import { openInMemory } from 'arcflow'
 
const db = openInMemory()
 
// Mutations are automatically captured in the sync WAL
db.mutate("CREATE (n:Person {name: 'Alice', age: 30})")
db.mutate("CREATE (n:Person {name: 'Bob', age: 25})")
 
// Check how many mutations are pending sync
console.log(db.syncPending())  // 2
 
// Read queries don't enter the WAL
db.query("MATCH (n:Person) RETURN n.name")
console.log(db.syncPending())  // still 2
 
// Graph fingerprint — hash of current state
console.log(db.fingerprint())  // "29553633"

Sync WAL#

The sync WAL captures every mutating query automatically. Read queries are never captured.

OperationEnters WAL?
db.mutate("CREATE ...")Yes
db.mutate("SET ...")Yes
db.mutate("DELETE ...")Yes
db.batchMutate([...])Yes (each query)
db.query("MATCH ...")No
db.query("CALL algo...")No
db.stats()No

Fingerprint#

The graph fingerprint is a hash of the entire graph state — generation, node count, relationship count, mutation sequence. Two instances with the same fingerprint have identical content.

const fp1 = db.fingerprint()
db.mutate("CREATE (n:Change {v: 1})")
const fp2 = db.fingerprint()
// fp1 !== fp2 — fingerprint changes after mutation

Use fingerprints to verify sync consistency: after a sync cycle, both client and cloud should have the same fingerprint.

Sync protocol#

The sync engine uses a push/pull protocol with resume via high-water marks:

  1. Push: local WAL entries batched into a sync request and POST'd to cloud
  2. Ack: cloud responds with acked_seq + fingerprint
  3. Pull: client requests changes since its remote_hwm
  4. Apply: remote queries replayed locally
  5. Verify: fingerprints compared — match = consistent

Sync request format#

{
  "peer_id": "node-1",
  "seq_start": 1,
  "seq_end": 3,
  "queries": [
    "CREATE (n:Person {name: 'Alice'})",
    "CREATE (n:Person {name: 'Bob'})",
    "CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'})"
  ],
  "fingerprint": 29553633
}

Queries are replayed on the receiving end — MERGE for idempotent operations, CREATE for new data.

Conflict resolution#

When two clients mutate concurrently, conflicts are resolved using vector clocks:

StrategyRuleDefault
Last-writer-winsHigher vector clock winsYes
First-writer-winsEarlier clock winsOptional
Evidence-weightedHigher confidence winsFor observation data

LAN Discovery#

ArcFlow instances on the same network discover each other automatically via UDP multicast. No configuration needed — peers announce themselves and sync propagates across the mesh.

Group:    239.255.0.1:7947
Announce: every 5 seconds
Stale:    60 seconds (peer removed if no heartbeat)
Protocol: {"op":"announce","peer_id":"af-abc123","data_port":7948}

CLI commands for mesh status:

arcflow sync health   # Show discovered peers
arcflow sync scopes   # List registered sync scopes
arcflow sync announce # Print this node's announcement JSON

Supported transports#

TransportHow
HTTP push/pullarcflow sync push/pull
Background auto-syncarcflow sync start daemon
LAN peer discoveryUDP multicast announce
WebSocket delta-pushLive delta stream over WS
ArcFlow WAL StreamHigh-throughput WAL streaming to read replicas
Object-store fan-outWAL segments written to S3/GCS/Azure for durable replication
WASM (browser)Not yet supported

Replication (SWMR)#

ArcFlow supports a Single-Writer-Multiple-Reader replication model via ArcFlow WAL Stream. The primary node streams WAL entries directly to read replicas, which apply them in order.

-- Check SWMR contract and replication configuration
CALL arcflow.replication.contract()
  YIELD mode, writes_enabled, replication_factor, description
 
-- ArcFlow WAL Stream parameters
CALL arcflow.replication.walTailing()
  YIELD field, value, description
 
-- Object-store fan-out configuration (S3/GCS/Azure)
CALL arcflow.replication.objectStoreFanout()
  YIELD field, value, description
 
-- Live replication health
CALL db.replicationStatus()

The mode from arcflow.replication.contract() is one of "primary", "replica", or "standalone". writes_enabled is false on read replicas.

API reference#

interface ArcflowDB {
  // ... existing methods ...
 
  /** Number of mutations pending sync push (0 if sync not configured). */
  syncPending(): number
 
  /** Graph fingerprint for sync verification. */
  fingerprint(): string
}

Sync subsystem#

ComponentWhat it provides
WAL delta captureMutating queries recorded with sequence numbers
Batched transportQueries batched for efficient push/pull
Push/pull orchestrationCoordinator for outbound and inbound sync
Pluggable transportMemory mock, HTTP, WASM fetch — same protocol
Causal orderingVector clock across peers for consistent ordering
Conflict detectionEntity-level detection and resolution
Fingerprint verificationState hash ensures sync consistency
Remote replayApply remote mutation queries locally

Architecture deep dive#

See Sync Architecture for the full protocol specification, implementation waves, and engine primitive mapping.

See Also#

  • Sync Architecture — full protocol specification, vector clocks, and engine primitives
  • Event Sourcing — WAL replay and temporal audit trail built on the same mutation log
  • Live Queries — live views that sync across nodes as CDC
  • Cloud Architecture — distributed mesh, ArcFlow WAL Stream, multi-region
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousGraph AlgorithmsNext →MCP Server (AI Agents)