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:

  1. poll database, , check new data
  2. or listen notifications database. preferred method. you'd need postgresql or oracle though

from web browser:

  1. reload page using refresh header (don't this)
  2. poll server using ajax
  3. use comet
  4. use server-sent events. lightest weight.
  5. use websocket

here's how spring, postgresql, , websocket: http://blog.databasepatterns.com/2014/04/postgresql-nofify-websocket-spring-mvc.html


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -