Postgres Notify for Real Time Dashboards

By Arctype Blog - 2021-03-05

Description

Using pg_notify in Postgres alongside the NOTIFY and LISTEN syntax is all that's needed to build a real time updating dashboard.

Summary

  • We’re going to take a look how I used a Postgres feature, pg_notify, to power a work schedule for a manufacturing company.
  • Instead, we’ll use a production_item_wip (work-in-progress) table where each row will contain a timestamp as the item progresses through the stages of production.
  • Here is a trigger procedure that sends a notification to the order_progress_event channel.
  • pg_notify lends itself well to being used within a trigger when used to deliver real-time data streaming.

 

Topics

  1. Database (0.24)
  2. Backend (0.24)
  3. Frontend (0.24)

Similar Articles

What is JSON? And why do you need it?

By DEV Community - 2020-12-27

Before going on to the topic JSON, I would like to discuss a simple example because it will be a lot... Tagged with javascript, beginners, tutorial, webdev.

How to Fetch Data in React: Cheat Sheet + Examples

By freeCodeCamp.org - 2021-02-12

There are many ways to fetch data from an external API in React. But which one should you be using for your applications in 2021? In this tutorial, we will be reviewing five of the most commonly used ...