Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolasburk committed May 3, 2024
1 parent 287387f commit f04ed58
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
43 changes: 34 additions & 9 deletions content/400-pulse/100-what-is-pulse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,48 @@ tocDepth: 3
toc: true
---

<TopBlock>
## What is Prisma Pulse?

[Prisma Pulse](https://www.prisma.io/data-platform/pulse) is managed database-event infrastructure that captures and distributes your database events to your application. It simplifies subscribing to type-safe data changes with an extended [Prisma Client](/orm/prisma-client) to power real-time functionality.
[Prisma Pulse](https://www.prisma.io/data-platform/pulse) is managed infrastructure that captures databases events (i.e. create, update and delete operations) and distributes them to your applications.

</TopBlock>
It lets you subsribe to any changes happening in your database using [Prisma Client](/orm/prisma-client) to power **real-time use cases** in your applications, such as:

## How Prisma Pulse works
- chat and messaging
- data syncing (e.g. into a search index)
- social interaction and collaboration
- notifying users
- updating inventories
- managing payments
- ... and any other functionality that requires real-time updates

Prisma Pulse leverages Change Data Capture (CDC) to efficiently observe and capture database changes as they occur. By monitoring the database's transaction log, Prisma Pulse identifies change events like inserts, updates, and deletes without impacting the database's performance.
Prisma Pulse integrates with [Prisma ORM](/orm) and easily lets you subscribe database changes in a type-safe way using Prisma Client:

The captured events are processed, evaluated, and swiftly distributed to relevant client subscriptions ensuring your applications stay synchronized with the latest database state.
![](/img/pulse/overview.png)

This eliminates the need for complex polling or manual data synchronization, saving you development time and effort.
## Why Prisma Pulse?

![What is Pulse](/img/pulse/what-is-pulse.png)
Building real-time functionality based on changes that occur in your database can be very complicated. Common approaches like _polling_, implementing _application-level updates_ or using _additional infrastructure_ (like Apache Kafka or RabbitMQ) either don't scale, are very costly or come with substantial development and maintenance overhead.

## What you can build with Prisma Pulse
Prisma Pulse is based on the idea of _unidirectional data flow_ which is implemented via [Change Data Capture](https://en.wikipedia.org/wiki/Change_data_capture) (CDC). CDC gets rid of the deficincies of the other approaches and solves the problem of reacting to database events in a robust and elegant manner.

Here is an overview of the main features Prisma Pulse provides:

- Reacting to database changes with type-safe model subscriptions
- Unidirectional data flow via Change Data Capture
- Great DX integrated with usage of Prisma ORM (easy setup, development and maintenance)
- Works with your existing database
- Insights dashboard lets you view and understand all database events captured by Pulse
- Enable, disable and manage Pulse via the [Platform CLI](/platform/platform-cli/)

## How does Prisma Pulse work?

Prisma Pulse uses CDC to efficiently observe and capture database changes as they occur. By monitoring the database's transaction log (e.g. the Write-Ahead-Log in PostgreSQL), Prisma Pulse identifies change events like inserts, updates, and deletes without impacting the database's performance.

The captured events are processed, evaluated, and distributed to all Prisma Client instances that subscribed to them:

![What is Pulse](/img/pulse/unidirectional-data-flow.png)

## What can you build with Prisma Pulse?

Prisma Pulse can power real-time functionality like chat, notifications, data broadcast, data synchronization, and more. It's ideal for ensuring data consistency in distributed systems, enhancing real-time user experiences.

Expand Down
Binary file added static/img/pulse/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/pulse/unidirectional-data-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f04ed58

Please sign in to comment.