javascript - notification to the user when a table in the database change -
i'm using spring project , need best solution problem, because affect performance system. better using javascript or create method on java ?
from web server:
- poll database, , check new data
- or listen notifications database. preferred method. you'd need postgresql or oracle though
from web browser:
- reload page using
refresh
header (don't this) - poll server using ajax
- use comet
- use server-sent events. lightest weight.
- use websocket
here's how spring, postgresql, , websocket: http://blog.databasepatterns.com/2014/04/postgresql-nofify-websocket-spring-mvc.html
Comments
Post a Comment