Is Wappler reactive?

Hello.

Quick question: is Wappler reactive?

If, for example, I had a table, and in each cell I was showing a number (and that number would be result of a SUM in a SQL query, for example), if a new row in the table was added externally (which would result in a new number from the query), would the number displayed in the cell be updated, automatically and in real-time?

Thanks!

Yes, indeed it can be. How are you adding the new data?

If you are using a form to add new data and the data is on the same page as your form you can load the query on success and it will refresh the data.

If it is on a different page that may be open and someone changes the data it can auto update using the action scheduler feature. The data will automatically refresh on a set time interval.

Hope that helps, if not perhaps provide more details of your exact use case.

You can do it by setting a scheduler to poll the server for changes.
But I don’t think there is any direct option to get push for the changes. There might be some JS library to get it done, and there by integrate with Wappler’s server connect to fetch latest data.

I see, so it does not update the data automatically and in real-time?

I thought it would push the updates automatically.

Where can I find more info on the Action Scheduler? I don’t seem to find any in the Docs section.

Thanks for your answers!

Wappler doesnt support websocket connections … you can use action scheduler


You can check

No this is websocket connection so you can check your data real-time

Data refresh and real-time data are different . You can use data-refreshing If you have small data in your db .

1 Like

what I was after is real-time updates of data in the page, without refreshes.

Scheduler doesn’t reload the page itself, just the set data.

Yes that is exactly what the built-in front-end framework App Connect is all about!

So yes you can fully make reactive websites and apps in Wappler

1 Like

But you need the Action Scheduler, right?

If so, it’s not updated real time, but everytime the scheduler calls the action. Correct?

Yes you can choose any period of time to fetch the updated data.

And if your data update comes from the same page, it can be auto updated.

yes @brad is absolutely correct. But I think @migsy confuses real-time data with data-refresh. If migsy wants to see a quick result, this is possible with “data / dataset” refresh or action scheduler. Very easy with wappler! … but real-time data works differently.

I mentioned it to avoid confusion.
https://www.websocket.org/

Thank you.

What I am after is automatic update. As soon as I change is made to the database, it automatically updates the front end.

No polling the database periodically, which puts some stress to it.

I guess this can only be done using websockets.

1 Like

no. you can do this with wappler

Actually even with websockets it can’t be done without polling.

As the database itself have to be reactive and natively support websockets and this is only possible with very expensive database servers

1 Like

you need to use onsuccess / ondone etc… events on your form submition … Please read wappler docs

1 Like

As I said, the data update does not come from submitting a form. The data is updated externally, and I would like the page to reflect the data changes automatically as soon as they happen.