Surreal Cloud Enterprise is now available
Sign up to our Early Access Programme

Run data, logic, and AI everywhere your application lives - no extra services needed

SurrealDB brings database power to the outermost edge: phones, browsers, IoT gateways, retail kiosks, and anything in between. Deploy the same engine you use in the cloud as a lightweight binary or WebAssembly module.

The challenge

Latency and battery drain

Pushing every read or write to the cloud introduces latency, drains batteries, and fails when connectivity is patchy.

Fragmented stores

Traditional embedded stores solve a slice of the problem but force developers to manage separate replication and access-control stacks.

Network dependency

Edge services fail when connectivity drops, breaking user experience and critical operations.

Complex sync logic

Hand-rolling bespoke stores, replication layers, and API wrappers creates operational overhead.

Surrealism

Same multi-model database, everywhere

Embedded runtime

Bundle SurrealDB directly into iOS/Android apps, WebAssembly in browsers, or gateway firmware.

Offline-first sync

Edge nodes operate autonomously, then reconcile to regional or global clusters with automatic conflict resolution.

Unified queries

Mix document, graph, and time-series reads in a single statement to power complex edge applications.

Persistent engine

Use RocksDB or SurrealKV backend for crash-safe storage on gateways, vehicles, and industrial PCs.

// Add SurrealDB to your binary cargo add surrealdb // Toggle embedded engine let db = Surreal::new::<node::Embedded>("embed://spectra")?;
-- Write logic once DEFINE TABLE reading PERMISSIONS FOR create, select WHERE auth.device = $auth; INSERT reading CONTENT { device: $auth, ts: time::now(), value: fn::get_device_input($auth) };

Real-world scenarios

From industrial IoT to mobile field apps, SurrealDB powers edge applications across industries.

-- Industrial IoT: Aggregate sensor data and run safety rules LET $sensor_data = ( SELECT value, ts FROM sensors WHERE device = $device AND ts > time::now() - 1h ); LET $anomaly_score = fn::edge_inference($sensor_data); IF $anomaly_score > 0.8 THEN INSERT INTO alerts { device: $device, severity: "critical", score: $anomaly_score }; END;

Retail point-of-sale resilience

Keep checkout lines moving when the store’s WAN link is saturated.

-- Each register runs SurrealDB with SurrealKV -- Transactions post locally, replicate to in-store peers BEGIN TRANSACTION; INSERT INTO transactions { register: $register_id, items: $cart_items, total: $total_amount, timestamp: time::now() }; -- Sync to in-store peer for failsafe SYNC "wss://store-gateway.local:8000"; COMMIT;

Mobile field applications

Field technicians record inspections and photos in remote areas with offline-first functionality.

-- SurrealDB in WebAssembly stores forms, images, and graph links INSERT INTO inspections { technician: $user_id, asset: $asset_id, photos: $photo_files, notes: $inspection_notes, location: $gps_coords, timestamp: time::now() }; -- Graph links to assets for relationship queries RELATE inspections:$inspection_id ->inspected-> assets:$asset_id; -- App feels native offline; updates sent when phone reconnects SYNC "wss://central.example.com:8000";

Connected vehicles

Vehicles stream telemetry, require local classification, and must pass compliance audits.

-- SurrealDB runs in the ECU, logs time-series data INSERT INTO telemetry { vehicle: $vehicle_id, speed: $current_speed, engine_temp: $engine_temp, location: $gps_coords, timestamp: time::now() }; -- Invoke Surrealism plugin with LLM for embedded inference LET $classification = fn::vehicle_ai_analysis($telemetry_data); -- Encrypt records with vehicle-bound keys UPDATE telemetry SET classification = $classification, encrypted = crypto::encrypt::aes($sensitive_data, $vehicle_key) WHERE id = $telemetry_id;

Security and governance built-in

Meet regulatory requirements without wrapping your DB in yet another proxy.

End-to-end encryption

Data at rest and in transit uses device-scoped keys. SurrealDB never exposes plaintext outside the node.

Fine-grained RBAC

Define permissions once in schema and reuse edge-to-cloud. Auditors trace every update with commit hashes.

Deterministic plugins

Surrealism runs in a sandboxed WebAssembly VM. Memory limits and capability filters prevent plugins from touching the OS.

Regulatory alignment

Keep PII local to comply with data residency, edge-redact before sync, or run homomorphic encryption plugins.

Business impact

Lower latency

Lower latency vs. cloud-only calls, improving UX and conversion rates.

Reduced bandwidth

Up to 90% reduction through local aggregation and diff-based sync.

Extended battery life

15–25% longer sessions by avoiding constant network churn.

Fewer components

Cut microservices count, caches, and message buses, slashing ops overhead.

Faster delivery

Developers iterate on schema and edge logic in a single repo; no hand-offs between teams.

Single governance

Unified governance model from edge to core with centralized policies and audit trails.

Ready to build and
deploy to the edge?

Start building intelligent applications for the edge with realtime, on-device decision making in one database.

Start for free
Learn more