Ok, I have a table in PostgreSQL. Then I have many users watching that list which is refreshing every 3 seconds (real time).
So what is the best option to see updated data in real time:
1) Run a query every 3 seconds in database.
2) Loading txt file (with JSON) generated each time the table receives a change.
Note: In both cases Im using ajax to refresh content.