[jQuery(ajax), Python] Is this too intense?
Posted: Sun Sep 02, 2012 10:28 am
Back end:
I have a loop on the server. It checks for updates in a file every second and sleeps. It loops twenty times then ends the script. Any new updates get returned to the user's browser.
Front end:
There's a javascript loop that uses ajax to call for an update from the server, then waits. If it fails or succeeds it waits for a whole second then loops. A success has new lines that get posted in the html.
I'm worried that having the server recheck a file every second is too demanding, especially when multiple browsers are using the same script.
I have a loop on the server. It checks for updates in a file every second and sleeps. It loops twenty times then ends the script. Any new updates get returned to the user's browser.
Front end:
There's a javascript loop that uses ajax to call for an update from the server, then waits. If it fails or succeeds it waits for a whole second then loops. A success has new lines that get posted in the html.
I'm worried that having the server recheck a file every second is too demanding, especially when multiple browsers are using the same script.