Hmmm ....

In the page with 2 Comets using FireBug do you see 2 Ajax requests
flying out?

Can you make a very minimalistic app derived from your existent
application that can reproduce this issue and post the app here as a
zip? Myself or someone else will surely look into this.

This is a bit strange because http://demo.liftweb.com also uses 2
comets and seems to be working fine.

Br's,
Marius

On Nov 24, 10:50 am, soumik <soum...@gmail.com> wrote:
> Thanks for the quick response, Marius.
>
> I am not running the browser with multiple tabs/windows. Its just 1
> firefox window with 1 tab pane.
> And I see this happening.
>
> About the part where I said, navigating away from the page doesn't
> affect the ajax polls, let me clarify a little.
> I have a page where I have 1 comet Actor for just general updates
> (related to my application) and another page with 2 comet actors - the
> general comet actor and a twitter-update comet actor. When I see this
> issue with the twitter page, if I go back to the main page with 1
> comet actor, the short ajax polls don't seem to cease. Also the comet
> actor id on both the pages(seen on the console performing ajax polls)
> seem to be the same.
>
> In the page source i've attached in my previous post, the comet actor,
> 1oz5aj38jk1he, as seen here:
> <script type="text/javascript" src="/comet_request/1oz5aj38jk1he/
> cometAjax.js"></script>
>
> seems to be the one making those short ajax polls.
>
> Also, is there any way by which we can check the destination of the
> ajax requests??
>
> On Nov 24, 12:51 pm, Marius <marius.dan...@gmail.com> wrote:
>
> > Are you using multiple tabs with the same page? or even having
> > multiple instances of the same browser having the same page opened in
> > the same time? If so don't, because the Ajax connections are shared
> > between tabs and even different instances of the same browsers. Try
> > using different browsers opening the same page if you want to test it.
>
> > After we get the session from SessionMaster we send a BreakOut message
> > which makes the ContinuationActors for this session to Unlisten from
> > CometActor. Consequently the the Comet connection is interrupted by
> > sending a response to the client. This mechanism is intended to avoid
> > Ajax connections starvation from browsers as browsers are quite
> > limited there.
>
> >  Having multiple Comets in the same page supposed to use a single Ajax
> > connection not more.
>
> > What do you mean by : "The fast short polls seem to persist even when
> > I'm navigating away from the page. ". Who would send the comet request
> > once you're not anymore on that page?
>
> > Br's,
> > Marius
>
> > On Nov 24, 8:42 am, soumik <soum...@gmail.com> wrote:
>
> > > Hi,
> > >  I'm trying to build a small Twitter application using scala, using
> > > Twitter4j  java library.
>
> > > In my application I'm using 2 comet actors, one needed for managing
> > > general updates(non-Twitter) and one for making twitter updates.
> > > Problem is as soon as I log into twitter using my app, I see that the
> > > Comet long polls are changing to very quick short polls, which seem to
> > > be very cpu intensive. The fast short polls seem to persist even when
> > > I'm navigating away from the page.
>
> > > Any idea why this behaviour is seen??
>
> > > Here's the html body of the page at runtime:
> > > -------------------
> > > <body onunload="document.getElementById('streamer').innerHTML='';">
>
> > >   <div id="F1063843174138UI2_outer" style="display: inline"><div
> > > id="F1063843174138UI2" style="display: inline">
> > >        <div id="maindisp"> </div>
> > >        <div id="sidebar"> </div>
> > >   <script type="text/javascript">
> > > // <![CDATA[
> > > /* JSON Func TwitterExp $$ F1063843174141L51 */function
> > > F1063843174141L51(obj) {liftAjax.lift_ajaxHandler
> > > ('F1063843174141L51='+ encodeURIComponent(JSON.stringify(obj)),
> > > null,null);}
> > > // ]]>
>
> > > </script></div><script type="text/javascript">
> > > // <![CDATA[
> > > var destroy_F1063843174138UI2 = function() {}
> > > // ]]>
> > > </script></div>
>
> > >     <!--             <lift:Menu.builder /> -->
> > >     <div id="lift__noticesContainer__"></div>
>
> > >     <div id="F10638431741235UP_outer" style="display: inline"><div
> > > id="F10638431741235UP" style="display: inline">
>
> > > <script type="text/javascript">
> > > // <![CDATA[
> > > /* JSON Func defaultActor $$ F1063843174126YCZ */function
> > > F1063843174126YCZ(obj) {liftAjax.lift_ajaxHandler
> > > ('F1063843174126YCZ='+ encodeURIComponent(JSON.stringify(obj)),
> > > null,null);}
> > > // ]]>
>
> > > </script></div><script type="text/javascript">
> > > // <![CDATA[
> > > var destroy_F10638431741235UP = function() {}
> > > // ]]>
> > > </script></div>
>
> > >   <script type="text/javascript" src="/ajax_request/liftAjax.js"></
> > > script>
> > > <script type="text/javascript" src="/comet_request/1oz5aj38jk1he/
> > > cometAjax.js"></script>
>
> > > <script type="text/javascript">
> > > // <![CDATA[
> > > var lift_toWatch = {"F1063843174138UI2": 1063843174140 ,
> > > "F10638431741235UP": 1063843174142};
> > > // ]]>
> > > </script>
> > > <script type="text/javascript">
> > > // <![CDATA[
>
> > > var lift_page = "F1063843174137HVV";
> > > // ]]>
>
> > > </script></body>
> > > -------------------

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to