r/AskProgramming • • Oct 13 '26

How do you keep dashboards sub-second fresh with real-time data replication?

People have stopped trusting our dashboards because they're always behind.

The warehouse refreshes every fifteen minutes, which doesn't sound terrible until operations starts making decisions from it. We'd like Oracle and Postgres changes flowing continuously instead.

Has anyone managed reliable **real-time data replication** with dashboards staying close to live

1 Upvotes

9 comments sorted by

2

u/Lumpy-Notice8945 Oct 13 '26

Is there no healthy middleground between 15 minutes and implementing some form of event listeners that push changes to your UI?

Sure ist possible to make some form of event driven architecture and whatever, but why not just poll the current value every second or so instead of every 15minutes?

1

u/PLBjt Oct 13 '26

Polling a bit more often gets you most of the way before you need anything fancy, and it's the cheapest thing to try first. Measure how stale the data really is end to end, from the source commit to the rendered chart, since the 15 minute schedule might be hiding a slow transform step rather than the load itself. For Postgres, logical decoding through Debezium is the usual route, but Oracle CDC is more fragile, so check how long your redo or archive logs are retained before you commit to it. CDC gets you seconds, but now you own ordering and backfills, which a scheduled refresh never made you think about.

1

u/who_you_are Oct 13 '26

when it comes to real time (or a stream of update) the solution is indirectly by having an API layer.

Whatever system the warehouse is using to make changes, it should call a middleman ("API"). That API job become two things:

  • update the warehouse database (like now)
  • publish update to your dashboard sub-system.

One thing that may help you, if they write directly into a database (I won't be surprised), check for a "proxy" server. You may emulate a database server; parsing the query to detect UPDATE on the table you are interested so you can pool fresh data or extract it from the query. In parallel you send the query to the real database.

The worst case scenario: you may need to pool for data. Hopefully they have a "last modified" field you can query fresh data.

Using database republication may be a little bit tricky but maybe they are library that can simulate using the transaction log as well for your database.

1

u/Ok-Meringue-3582 Oct 13 '26

Look into Estuary.dev

3

u/TheMrCurious Oct 13 '26

And now we know the reason behind this post - advertising.

1

u/Ok-Meringue-3582 Oct 13 '26

Aren't you curious, Mr. Curious?

1

u/SnugglyCoderGuy Oct 13 '26

You get your data from as close to the source as you can.

Without more details on your situation, a better answer can't be given.

1

u/Late-Class4435 Oct 15 '26

Look at the whole pipeline before blaming replication. Fast CDC won't help if your warehouse or BI tool only refreshes every few minutes