Timothy Kaler
New member
It would be nice to have a single API which allows various parts of the application, and 3rd party extensions to be able to "Push" client side events to the user. These events might be notifications, updated content, or something else.
There could be a single poll to the server which fetches a list of JSON objects at some admin configurable frequency. Each JSON object should specify a javascript function and its arguments. Each object would represent an event that the application wishes to "push" to the user.
To decrease the cost of polling, you could associate each event with an auto-incrementing id. Then each client could locally store the last event id they received, and a server side file associated with the user could contain the last event id the application "pushed" to the user. Then there would be a static file associated with each active user on the board, and each user could make low cost polls to their static file to determine whether or not they need to make a more costly poll to the database utilizing event fetching script.
~Tim
There could be a single poll to the server which fetches a list of JSON objects at some admin configurable frequency. Each JSON object should specify a javascript function and its arguments. Each object would represent an event that the application wishes to "push" to the user.
To decrease the cost of polling, you could associate each event with an auto-incrementing id. Then each client could locally store the last event id they received, and a server side file associated with the user could contain the last event id the application "pushed" to the user. Then there would be a static file associated with each active user on the board, and each user could make low cost polls to their static file to determine whether or not they need to make a more costly poll to the database utilizing event fetching script.
~Tim
Upvote
0