Hi, May be Tapestry is not designed to support comet but I thought of giving it a try and see what happens. The dispatcher approach does the job for me except for one thing. Once the reverse ajax script fires the change made to the TML files will not get reflected in the browser. I have to restart the web application to see the effect of a change in TML files. This is causing lot of inconvenience in the development environment.
In the dispatcher based comet implementation, a request dispatcher handles all the reverse ajax calls. The dispatcher checks for new data every second and responds with a status when data is found. I used Thread.sleep(...) method to add the polling delay. Can someone please help me understand why this would prevent changes TML files from getting automatically reloaded when modified? ----- Original Message ---- From: Juan Isern <juanis...@gmail.com> To: users@tapestry.apache.org Sent: Sun, 16 May, 2010 1:26:49 AM Subject: Re: comet implementation issue Hi Rajesh, Maybe Tapestry is not meant to do Comet for the reasons that Thiago stated. I'm implementing Comet as well but with a different approach: The Comet thing is totally handled by another tool (DWR) that's used only to notify clients that some data is available. When a notification ("data is ready") comes, we perform some action or refresh a zone in the page (this time is handled 100% by Tapestry) It is true that DWR and Tapestry features overlap at some point, but I think is a good tradeoff. Regards rajeshs wrote: > > Thanks Thiago, The markup returned is very simple. I'll try out the > dispatcher approach. BTW you are right I am using Tapestry 5.1.0.5. > > regards, > Rajesh > > > ----- Original Message ---- > From: Thiago H. de Paula Figueiredo <thiag...@gmail.com> > To: Tapestry users <users@tapestry.apache.org> > Sent: Wed, 12 May, 2010 5:59:12 PM > Subject: Re: comet implementation issue > > On Wed, 12 May 2010 00:19:20 -0300, rajesh sukumaran > <rajeshs_...@yahoo.co.in> wrote: > >> Hi, > > Hi! > >> I implemented reverse ajax component that uses long polling technique. >> Basically what I did was to use JQuery's jQuery.getJSON(...) method to >> make an >> ajax call using an action event URL of the component. The action event on >> the component spawns another event(using resourse.triggerEvent()) which >> is handled by the page that holds the component. The event handler in the >> page waits for the relevant data to be available and when it is available >> return a block for displaying the data. > > Tapestry uses a pool of pages. So, when a request takes long to complete > and more requests to the same page are done, the number of page instances > checked out of pool the increases until it reaches the hard limit. So, > yes, Tapestry pages were not meant to use in long polling. > > Is the block your returning complex markup? If not, I would create a > Dispatcher (that is not pooled) to handle these requests and return the > information as JSON. > >> BTW I am using Tapestry 5.0.1 with tomcat 6.0. Any help is much >> appreciated. > > 5.0.1? Wouldn't it be 5.1? 5.0.1 is almost three years old now. > > --Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://old.nabble.com/comet-implementation-issue-tp28531634p28570596.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org