Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Server puch from database to UI part
I have requirement to push the data from database automatically( whenever new row is inserting) to UI(vaadin table) without pressing any refresh button.
Let suppose 4 user are there. One user is inserting the data into one table of database. And other 3 are viewing data from same table of database (in which 1st user is inserting data) from some different UI through vaadin table. So all the 3 users are able to see new row inserted in their UI without pressing refreshing button.!!
Actually, I have done that thing with multithreading. Means thread is calling database on some regular interval of time and update vaadin table . With this we can update the vaadin table with new rows without pressing refresh button.
But my concern is with performance. Because after regular interval of time thread will automatically call database , no matter whether there is any new row is inserting into database or not. Means let suppose if no row is inserting into database, then unnecessary we are calling database on regular interval of time.
So provide me solution on this issue, how to resolve this performance issue...!!
It sounds like the Rows are only added by the Vaadin application. In that case you can use Broadcasting messages to other users so that whenever someone adds a row you fire the Broadcast-Event. When you were already using poll or push these should arrive almost instantly (at least with push). In the Broadcast-Listener you can then update your table from the database or you could even send the newly added Data with the Broadcast and immediatly add it to the table without accessing the DB if you really want to cut down on DB Accesses.
Maybe the two options from https://vaadin.com/forum#!/thread/10486153/10491207 also help.