---
title: "Real-Time Applications | Use Cases | SurrealDB"
description: "Build real-time, event-driven applications with SurrealDB. Live queries, events, WebSocket subscriptions, and collaborative patterns."
url: https://surrealdb.com/use-cases/real-time
---

# Real-time, event-driven applications

Live queries, events, WebSocket subscriptions, and collaborative patterns - built into the database, which becomes your event bus and your source of truth at once.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Real-time guide](https://surrealdb.com/docs/learn/querying/real-time/real-time-best-practices)

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

LIVE QUERIES

## Subscribe to changes, not to polling intervals

Live queries push changes to connected clients the moment data is modified. No polling, no message broker, no change data capture pipeline. The database is the event system.

```
1-- Subscribe to all changes on messages in a chat room2LIVE SELECT * FROM message WHERE room = room:general;34-- Subscribe to changes on a specific record5LIVE SELECT * FROM user:jaime;
```

EVENTS & TRIGGERS

## Reactive workflows inside the database

TABLE and FIELD events fire on data changes. Build reactive workflows - notifications, audit logs, computed fields, cascading updates - without external event systems.

### Table events

Fire SurrealQL on CREATE, UPDATE, or DELETE for any table. Build audit trails, notifications, and cascading logic.

### Field-level triggers

React to changes on specific fields. Compute derived values, enforce business rules, and trigger side effects.

### WebSocket streaming

Connect clients over WebSocket for real-time data streaming. No separate message broker required.

### Collaborative patterns

Build collaborative applications - shared editors, multiplayer games, real-time dashboards - with built-in conflict resolution.

REAL-TIME AGENTS

## Real-time coordination for multi-agent systems

Live queries are the transport layer for multi-agent coordination. When one agent commits a finding, live queries push the update to every other agent in real time. Agent handoffs, context updates, and event-driven workflows all happen through shared context with ACID guarantees - no polling, no message broker, no stale context.

FREQUENTLY ASKED QUESTIONS

## Real-time

How do live queries work in SurrealDB?

Do I need a separate message broker?

GET STARTED

## Build real-time applications

Live queries, events, and WebSocket subscriptions - built into the database.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)![NVIDIA](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)![Apple](https://surrealdb.com/assets/static/f7dc2519e0d212bc.Cn8MYAK7.svg)![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Real-time guide](https://surrealdb.com/docs/learn/querying/real-time/real-time-best-practices)

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Real time","item":"https://surrealdb.com/use-cases/real-time"}]}
```

```json
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"How do live queries work in SurrealDB?","acceptedAnswer":{"@type":"Answer","text":"Live queries are persistent subscriptions. When you execute a LIVE SELECT statement, SurrealDB monitors the matching data and pushes changes to your client over WebSocket whenever records are created, updated, or deleted."}},{"@type":"Question","name":"Do I need a separate message broker?","acceptedAnswer":{"@type":"Answer","text":"No. SurrealDB's live queries and event system replace the need for external message brokers like Kafka or RabbitMQ for many real-time use cases. The database itself is the event source."}}]}
```
