Vaadin equivalent of setInterval (javascript) and server-side processing?

How can a Vaadin Framework application accomplish functionality similar to javascript’s setInterval were a client will potentially poll a server at a specified interval, the server will do some process and return some JSON to the client? Usually, with this flow, the setInterval would trigger a call to a PHP script on the server with parameters to use for the processing.

I’m wondering how one would would send params back to the server with Vaadin and trigger a process to run and return something.

Olli

For Server Push, can a server thread be created for each client connection and then continue running at an interval (perhaps with a TimerTask) to send any necessary data via push to the client? Is that the best practice or would that overload the server with threads?

PD

Hi,

Maybe
Server Push
is what you’re looking for? Or
Polling
?

-Olli

This talk is awesome and could help you a lot:
https://www.youtube.com/watch?v=b9Dj1xx6dGc

Thank you Alejandro. That video was indeed very helpful. I understand the process much better now.