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.
Pushing every read or write to the cloud introduces latency, drains batteries, and fails when connectivity is patchy.
Traditional embedded stores solve a slice of the problem but force developers to manage separate replication and access-control stacks.
Edge services fail when connectivity drops, breaking user experience and critical operations.
Hand-rolling bespoke stores, replication layers, and API wrappers creates operational overhead.
Same multi-model database, everywhere
Bundle SurrealDB directly into iOS/Android apps, WebAssembly in browsers, or gateway firmware.
Edge nodes operate autonomously, then reconcile to regional or global clusters with automatic conflict resolution.
Mix document, graph, and time-series reads in a single statement to power complex edge applications.
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) };
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;
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;
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";
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;
Meet regulatory requirements without wrapping your DB in yet another proxy.
Data at rest and in transit uses device-scoped keys. SurrealDB never exposes plaintext outside the node.
Define permissions once in schema and reuse edge-to-cloud. Auditors trace every update with commit hashes.
Surrealism runs in a sandboxed WebAssembly VM. Memory limits and capability filters prevent plugins from touching the OS.
Keep PII local to comply with data residency, edge-redact before sync, or run homomorphic encryption plugins.
Lower latency vs. cloud-only calls, improving UX and conversion rates.
Up to 90% reduction through local aggregation and diff-based sync.
15–25% longer sessions by avoiding constant network churn.
Cut microservices count, caches, and message buses, slashing ops overhead.
Developers iterate on schema and edge logic in a single repo; no hand-offs between teams.
Unified governance model from edge to core with centralized policies and audit trails.
Start building intelligent applications for the edge with realtime, on-device decision making in one database.