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
Start
  • Quickstart
  • Installation
  • Bindings
  • Platforms
  • Get Started
  • Cookbook
Concepts
  • World Model
  • Graph Model
  • Evidence Model
  • Observations
  • Confidence & Provenance
  • Proof Artifacts & Gates
  • SQL vs GQL
  • Graph Patterns
  • Parameters
  • Query Results
  • Persistence & WAL
  • Snapshot-Pinned Reads
  • Error Handling
  • Execution Models
  • Causal Edges
  • Adapter Discipline
  • Time Decay
  • Layers
  • 1. World Store
  • 1a. World Store · Smart Reader
  • 2. Perception Lake
  • 3. World Graph
  • 4. Query Engine
  • 5. Live Surface
  • 6. Event Bus
  • 7. Behavior Engine
  • 8. Algorithm Library
  • Virtual Computed Columns
  • Threading Model
  • Typed ID Contract
WorldCypher
  • Overview
  • Execution Options
  • Statements
  • MATCH
  • WHERE
  • RETURN
  • OPTIONAL MATCH
  • CREATE
  • SET
  • MERGE
  • DELETE
  • REMOVE
  • Composition
  • WITH
  • UNION
  • UNWIND
  • CASE
  • Schema
  • Schema Overview
  • Indexes
  • Constraints
  • Functions
  • Built-in Functions
  • Aggregations
  • Procedures
  • Shortest Path
  • EXPLAIN
  • PROFILE
  • Temporal Queriesfacet
  • Spatial Queriesfacet
  • Algorithmsfacet
  • Triggers
Capabilities
  • Live Queries
  • Vector Search
  • Trusted RAG
  • Spatial Knowledge
  • Temporal
  • Behavior Graphs
  • Graph Algorithms
  • Skills
  • CREATE SKILL
  • PROCESS NODE
  • REPROCESS EDGES
  • Sync
  • Programs
  • GPU Acceleration
  • Agent-Native
  • MCP Server
  • Event Sourcing
  • Intent Relay
  • Event Bus
Use Cases
  • Agent Tooling
  • Trusted RAG
  • Knowledge Management
  • Behavior Graphs
  • Autonomous Systems
  • Physical AI
  • Digital Twins
  • Robotics & Perception
  • Sports Analytics
  • Grounded Neural Objects
  • Fraud Detection
Walkthroughs
    Guides
  • Agent Integration
  • Building a World Model
  • Modeling a Social Graph
  • Build a RAG Pipeline
  • Using Skills
  • Behavior Graphs
  • Swarm & Multi-Agent
  • Fleet Coordination
  • Migrate from Cypher / Neo4j
  • From SQL to GQL
  • Filesystem Workspace
  • Data Quality
  • Code Intelligence
  • Scale Patterns
  • v0.7 → v0.8 Lakehouse Fast-Path
  • Tutorials
  • Knowledge Graph
  • Entity Linking
  • Vector Search
  • Graph Algorithms
  • Recipes
  • CRUD
  • Multi-MATCH
  • MERGE (Upsert)
  • Full-Text Search
  • Batch Projection
  • Multi-Source Observation
  • Sports Analytics
Operations
  • CLI
  • REPL Commands
  • Snapshot & Restore
  • Filesystem Projection
  • Plugin Management
  • Agent Governance
  • Server Modes & PG Wire
  • Persistence (ops)
  • Import & Export
  • Deployment
  • Deployment Modes
  • Daemon (UDS)
  • Why not Docker
  • Architecture
  • Engine Architecture
  • Cloud Architecture
  • Sync Protocol (Deep Dive)
  • World Graph Substrate (Preview)
Reference
  • TypeScript API
  • Glossary
  • Naming & Domain Map
  • Data Types
  • Operators
  • Error Codes
  • GQL Reference
  • Known Issues
  • Versioning
  • Licensing
  • Conformance
  • GQL Conformance
  • openCypher TCK
  • Extension Regressions
GQL Reference
    Conformance
  • Conformance Dashboard
  • openCypher TCK Results
  • Extension Regressions
  • Features
  • MATCH Basic
  • CREATE Nodes Edges
  • SET REMOVE Properties
  • DELETE Detach DELETE
  • RETURN WITH WHERE
  • Order BY Limit Skip
  • Order BY Nulls First Last
  • UNWIND
  • Aggregate Functions
  • OPTIONAL MATCH
  • Variable Length Paths
  • Label OR AND NOT Expressions
  • Label Wildcard
  • Quantified Path Sugar
  • Path Modes Walk Trail Simple Acyclic
  • Shortest Path Variants
  • IS Labeled Predicate
  • Element ID Function
  • IS Type Predicate
  • Binary Literals
  • Line Comments Solidus
  • Line Comments Minus
  • GQLSTATUS Result Codes
  • GQL Error Code Mapping
  • Transaction Control Syntax
  • SET Session
  • Conditional Execution WHEN THEN ELSE
  • RETURN NEXT Pipeline
  • Primary Key Constraint
  • Unique Constraint
  • Deterministic MERGE Via PK
  • Undirected Edge MATCH
  • Cast Type Conversion
  • GQL Directories
  • Multiple Labels Per Node
  • GQL Flagger
  • NEXT Linear Composition
  • Cardinality Function
  • INT64 BIGINT Type Names
  • FLOAT64 Double Type Names
  • Log10 Log2 Functions
  • Trim Leading Trailing Both
  • FILTER Clause
  • LET Statement
  • Group BY Explicit
  • EXCEPT SET Operations
  • INTERSECT SET Operations
  • ALL Different Predicate
  • Same Predicate
  • Property Exists Function
  • Path Variable Binding
  • USE Graph Clause
  • FOR IN List
  • Typed Temporal Literals
  • Session SET Value Params
  • Typed List Annotations
  • arcflow.cosine() function
  • arcflow.embed() function
  • arcflow.similar() procedure
  • arcflow.graphrag() procedure
  • ArcFlow Extensions
  • LIVE Queries
  • Triggered Write-Back Views
  • Evidence Algebra
  • Relationship Skills
  • AI Function Namespace
  • Graph Embedding Algorithms
  • ASOF JOIN
  • Durable Workflows
  • Incremental Z-Set Engine
  • GPU GraphBLAS
  • Triggers
  • HNSW Vector Index
  • Extensions Moat

Sync Protocol (Deep Dive)

ArcFlow instances run locally (browser WASM, Node.js, edge device) and optionally sync to a persistent cloud graph via HTTPS. Local operations are instant. Sync is eventual, conflict-resolved, and resumable.

Overview#

Local instance              Cloud / Primary
┌──────────────────┐  HTTPS  ┌──────────────────┐
│ Browser (WASM)   │────────→│ ArcFlow Cloud    │
│ Node.js process  │←────────│                  │
│ Edge device      │  sync   │ Persistent graph │
│                  │         │ Shared state     │
│ Local WAL        │         │ Multi-client     │
└──────────────────┘         └──────────────────┘

All operations happen locally first. Sync pushes WAL deltas to the cloud and pulls remote changes back. Conflicts are resolved algebraically.

Activation#

Browser#

https://oz.com/engine?sync=af_xxxxxxxxxxxx

SDK#

import { open, openInMemory } from '@ozinc/arcflow'
 
// In-memory with cloud sync
const db = openInMemory({
  sync: 'https://api.oz.com/v1/graphs/my-graph',
  token: 'af_xxxxxxxxxxxx'
})
 
// Persistent with cloud sync
const db = open('./local-graph', {
  sync: 'https://api.oz.com/v1/graphs/my-graph',
  token: 'af_xxxxxxxxxxxx'
})
 
// Self-hosted sync target
const db = openInMemory({
  sync: 'https://my-company.com/arcflow/sync',
  token: process.env.ARCFLOW_TOKEN
})

MCP server#

npx arcflow-mcp --sync https://api.oz.com/v1/graphs/my-graph --token af_xxx

Sync protocol#

Data flow#

1. Local mutation
   ↓
2. Append to WAL (MutationOp with sequence number)
   ↓
3. Batch into sync payload { peer_id, seq_start, seq_end, ops[], fingerprint }
   ↓
4. POST to sync endpoint
   ↓
5. Cloud applies ops with conflict resolution
   ↓
6. Cloud responds with remote changes since client's high-water mark
   ↓
7. Client applies remote changes locally
   ↓
8. Fingerprint comparison — both sides should match

Sync batch format#

interface SyncBatch {
  peer_id: string           // Client identifier
  seq_start: number         // First sequence number in batch
  seq_end: number           // Last sequence number in batch
  ops: MutationOp[]              // Mutations (CreateNode, DeleteNode, SetProperty, etc.)
  fingerprint: number       // Graph state hash after applying ops
}

MutationOp types#

type MutationOp =
  | { type: 'CreateNode', id: string, labels: string[], properties: Record<string, string> }
  | { type: 'CreateRelationship', id: string, start: string, end: string, rel_type: string, properties: Record<string, string> }
  | { type: 'UpdateNodeProperties', id: string, properties: Record<string, string> }
  | { type: 'SetNodeProperties', id: string, properties: Record<string, string> }
  | { type: 'RemoveNodeProperty', id: string, key: string }
  | { type: 'DeleteNode', id: string }
  | { type: 'DeleteRelationship', id: string }

Resume protocol#

Each client tracks a high_water_mark — the highest sequence number received from the cloud. On reconnect, the client sends its HWM and receives only the changes since then:

POST /sync
{
  "peer_id": "browser-abc123",
  "high_water_mark": 4207,
  "delta": { ... }         // local changes since last sync
}

Response:
{
  "remote_delta": { ... }, // changes from other clients since HWM
  "new_high_water_mark": 4215,
  "fingerprint": 9823471   // expected state after applying all
}

Conflict resolution#

When two clients mutate the same entity concurrently, ArcFlow resolves conflicts using vector clocks and Z-set algebra.

Vector clock ordering#

Client A: { A: 5, B: 3 }
Client B: { A: 4, B: 6 }

Neither dominates → concurrent → conflict detected

Resolution strategies#

StrategyRuleUse case
Last-writer-winsHigher vector clock winsDefault, simple
Confidence-weightedHigher confidence value winsEvidence/observation data
Z-set mergeAlgebraic: insertions add, retractions subtractCounters, aggregates

Evidence-aware merge#

For nodes with confidence scores, the merge preserves the highest-confidence observation:

Client A writes: { name: 'Alice', confidence: 0.87, observation: 'inferred' }
Client B writes: { name: 'Alice', confidence: 0.95, observation: 'observed' }

Merge result: { name: 'Alice', confidence: 0.95, observation: 'observed' }

The engine's confidence-aware merge algebra picks the highest-confidence, highest-observation-class value across concurrent writes: add(a, b) = (max_confidence, highest_observation).

Fingerprint verification#

After applying all changes, both client and cloud compute a fingerprint (hash of graph state). If they match, sync is consistent. If not, a full snapshot reconciliation is triggered.

Implementation waves#

Wave 1: Push-only sync (cloud backup)#

Local → cloud. No conflict resolution needed. Client pushes WAL deltas, cloud applies them.

const db = openInMemory({ sync: url, token, mode: 'push' })
// All local mutations automatically batched and pushed

Wave 2: Bidirectional sync (multi-client)#

Cloud → local + local → cloud. Vector clock conflict resolution. Resume via high-water marks.

const db = openInMemory({ sync: url, token, mode: 'sync' })
// Mutations sync both ways, conflicts auto-resolved

Wave 3: Replicated live views#

Standing queries (CREATE LIVE VIEW) replicated across clients. A live view defined on one client is automatically maintained on others.

// Client A defines a view
db.mutate("CREATE LIVE VIEW top_scores AS MATCH (n) WHERE n.score > 0.9 RETURN n")
 
// Client B reads the same view (synced, incrementally maintained)
db.query("MATCH (row) FROM VIEW top_scores RETURN row")

Wave 4: Edge sync (offline-first)#

Edge devices (IoT, mobile) that go offline and reconcile when back online. Full conflict log with manual resolution option.

Sync capabilities#

The sync engine provides all the primitives needed for local-first architectures:

CapabilityWhat it gives you
WAL delta transportIncremental mutations only — never re-sends unchanged state
Conflict detectionEntity-level detection with causal ordering across peers
Algebraic mergeInsert/retract/consolidate — converges without coordination
Confidence-aware mergeEvidence weights propagate through conflict resolution
Graph fingerprintingHash verification prevents tampering or partial sync
CDC eventsNodeCreated, PropertyChanged, and relationship events
Mutation log querydb.changesSince(seq) — query mutations since any sequence number
Full state snapshotdb.snapshotJson() — complete graph for initial peer sync
Replication modesPrimary / Replica / Edge — runtime-configurable

HTTP API endpoints (planned)#

POST   /v1/graphs/:id/sync     — push delta, receive remote changes
GET    /v1/graphs/:id/snapshot  — full graph snapshot (for initial sync)
GET    /v1/graphs/:id/changes   — changes since sequence N
POST   /v1/graphs/:id/resolve   — manual conflict resolution
GET    /v1/graphs/:id/status    — sync status, peer count, lag

Security#

  • All sync over HTTPS (TLS 1.3)
  • Bearer token authentication per graph
  • Optional: per-peer write permissions (read-only replicas)
  • Fingerprint verification prevents tampering
  • WAL ops are signed with peer_id for provenance

See Also#

  • Sync — capability overview: WAL delta, conflict resolution, and db.changesSince()
  • Cloud Architecture — edge mesh, WAL segment shipping, and CDC delta sync
  • Architecture — in-process engine architecture and storage model
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousCloud ArchitectureNext →World Graph Substrate (Preview)