wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.36k stars 1.18k forks source link

Adding support for real-time data updates #1454

Open infomiho opened 11 months ago

infomiho commented 11 months ago

Let's just see what we have now:

This is fine for most use-cases, but I think we can do a simple upgrade to make it more real-time.

Naive Real-time Approach

For example, a very simple and naive approach could be:

The Devil Is In the Details

This would make our clients "real-time", although, they would fetch a lot of data if we don't scope the events somehow (maybe by user or we give explicit control to the user what should be "realtime")

Our main issue (other than making sure events are published for updates) would be to figure out the scoping. This is something we should flesh out in an RFC before jumping on this task.

Existing Work

Supabase operates similarly https://supabase.com/docs/guides/realtime, and now I found that Directus does as well https://directus.io/toolkit/realtime

sodic commented 11 months ago

Other things to consider: