When Xano released Realtime I naively thought that we could configure the database to sync, kind of like how an app built with Bubble always shows the latest updates to the DB.
Maybe it is possible with Xano, but the only documentation or tutorials I can find are based around a “chat” use case lol.
If on a specific page I need realtime updated data for multiple different things:
Should I setup a channel for each?
or is there a way that I can send different data types through the same channel and somehow have a workflow to determine what actually needs to be updated?
Or should just have a realtime event that triggers the collections to fetch again?
I’m just wondering what the best practice would be here.
I would create a channel in Xano and enable nested channels. Then in WeWeb you would open a nested channel specific to the page being viewed. I’d use a JSON array to transmit more complex data.
This was actually one of the first videos I watched on it. It was really helpful, but its just updating data from 1 table in the DB, whereas I’m trying to update data from multiple different tables, but not all at the same time. Sometimes data from 1 table needs to be updated and sometimes its data from a different table
In the video example, he only sent static test messages, but with Xano you can pull data from multiple tables and combine them into a single real-time JSON payload.
You could also set up separate function stacks for each table, each sending a real-time event with its updated info.
To fire these real-time events when a record changes, you’d just set up Xano triggers or add the “Send Realtime Event” function to your existing update function stack.
In the payload, you would include the details about the table and fields that were updated and then use a WeWeb workflow to process the realtime message according to its payload content.
If it would help you get your app live quicker, you could simplify it by using separate channels for each data type, but it shouldn’t be necessary. And I’m not sure how that would impact WeWeb performance.