The implications of the jquery plugin periodicalupdater
In one of my previous questions, I've asked how I would replicate facebook's "new message" alert, that is shown in the head section of their website inline with the "inbox" link. The functionality allows data to be updated live, without the user refreshing their browser, and has since been integrated further into their technology, allowing live updates of times, and dates.
In the question, I was referred to a jquery plugin that replicates the prototype ajax.periodicalUpdated function, which has turned out to be a pretty cool plugin. But I am concerned about the implications of using a script that makes multiple posts per min(atleast 3 as per my settings). For in开发者_StackOverflow社区stance, what kind of load will it put on a server if it is being executed by multiple users? Can it be hacked in anyway, or in such a manner, that it causes disruptions, and loading issues? Is there anything I should know(as a javascript/ajax/jquery newbie) before using this plugin in the production of a LAMP based website which is expecting large traffic intake?
Thanks for any answers, Lea.
Handling three requests per minute per user isn't much to worry about. Just be sure to keep the data transmitted to a minimum. You also might want to put in place boolean flags on the client-side that can be toggled on and off depending on the response form the server. If a request comes in long after the expiration of the users session (they left their laptop on with your website opened), you can disable future requests from them and leave a friendly message like "You've been logged out due to inactivity."
精彩评论