Hi, Is there best practices about how to setup Ajax Periodical Updater ? Well I mean if you set on a user webpage a Periodical Updater to pull information there is 2 sides effects: 1. The session is never timeout because a request is performed periodicaly. (When users go to lunch with opened browser) 2. If 500 browsers open the same webpage then 500 requests are done periodicaly that could get down the application server. So is there well knwown, good period configuration for the side effect 2. ? I know that depends of server(S) but juste a little idea ? Should it be in seconds, minutes ? Regards, Jp -- Jean-Philippe Encausse - R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Jean-Philippe, Sorry, that''s one of these ''how long is a piece of string?'' questions. :-) It''s going to depend entirely on what your app is doing. When you poll the server, you''re trying to simulate a ''push'' of data from server to client. The polling interval dictates the responsiveness of that push, and the overall load on the server. Responsiveness is going to be determined by the type of app - a server ''heartbeat'' monitor might get away with once every five minutes, a stock trader might demand once a second. the only way to determine what sort of load your server can withstand is by measuring it. If you really do require a very fast response time, then polling is maybe not the best way to achieve it. You might want to look at Comet/Reverse Ajax, in which a single HTTP connection is held open long term on the server, and data pumped down it on demand. This is still very much bleeding edge, and full of hidden bear traps - the best implementation that I''m aware of is in the DWR toolkit. Depends how much effort you''re willing to invest in figuring out all the issues. HTH Dave On Thursday 14 June 2007 09:46, Jean-Philippe Encausse wrote:> Hi, > > Is there best practices about how to setup Ajax Periodical Updater ? > > Well I mean if you set on a user webpage a Periodical Updater to pull > information there is 2 sides effects: > > 1. The session is never timeout because a request is performed > periodicaly. (When users go to lunch with opened browser) > > 2. If 500 browsers open the same webpage then 500 requests are done > periodicaly that could get down the application server. > > > So is there well knwown, good period configuration for the side effect 2. ? > I know that depends of server(S) but juste a little idea ? Should it > be in seconds, minutes ? > > Regards, > Jp-- Author: Prototype & Scriptaculous in Action, Ajax in Practice, Ajax in Action --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, In fact my little app may send messages to visitors while they wait on a web page. My question was for a single PC with single Tomcat with hundred visitors. Off-Course I will let the configuration open for configuration tunning. I do not need Comet architecture, but it is very interresting to know that DWR seems to be the best implementation. Jp On 6/14/07, Dave Crane <dave-Sy7q136SasSXmMXjJBpWqg@public.gmane.org> wrote:> > > Hi Jean-Philippe, > > Sorry, that''s one of these ''how long is a piece of string?'' questions. :-) > It''s going to depend entirely on what your app is doing. > > When you poll the server, you''re trying to simulate a ''push'' of data from > server to client. The polling interval dictates the responsiveness of that > push, and the overall load on the server. Responsiveness is going to be > determined by the type of app - a server ''heartbeat'' monitor might get > away > with once every five minutes, a stock trader might demand once a second. > the > only way to determine what sort of load your server can withstand is by > measuring it. > > If you really do require a very fast response time, then polling is maybe > not > the best way to achieve it. You might want to look at Comet/Reverse Ajax, > in > which a single HTTP connection is held open long term on the server, and > data > pumped down it on demand. This is still very much bleeding edge, and full > of > hidden bear traps - the best implementation that I''m aware of is in the > DWR > toolkit. Depends how much effort you''re willing to invest in figuring out > all > the issues. > > HTH > > Dave > > > > On Thursday 14 June 2007 09:46, Jean-Philippe Encausse wrote: > > Hi, > > > > Is there best practices about how to setup Ajax Periodical Updater ? > > > > Well I mean if you set on a user webpage a Periodical Updater to pull > > information there is 2 sides effects: > > > > 1. The session is never timeout because a request is performed > > periodicaly. (When users go to lunch with opened browser) > > > > 2. If 500 browsers open the same webpage then 500 requests are done > > periodicaly that could get down the application server. > > > > > > So is there well knwown, good period configuration for the side effect > 2. ? > > I know that depends of server(S) but juste a little idea ? Should it > > be in seconds, minutes ? > > > > Regards, > > Jp > > -- > Author: Prototype & Scriptaculous in Action, Ajax in Practice, Ajax in > Action > > > >-- Jean-Philippe Encausse - R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---