Comet long polling and routers

94 views
Skip to first unread message

Lukasz Kuczera

unread,
Oct 21, 2010, 7:28:40 AM10/21/10
to Lift
Hello Lifters,
I've question about long polling with comet. If connection is held too
long most of routers will kill it. When killed does the CometActor
restart it automagically ?

David Pollak

unread,
Oct 21, 2010, 9:43:57 AM10/21/10
to lif...@googlegroups.com

If the connection is lost for any reason, the browser will restart the long poll.

The comet request timeout defaults to 120 seconds (LiftRules.cometRequestTimeout).  If there's no change during that 120 seconds, a "Noop" is sent to the browser and the browser waits 100 milliseconds and restarts the long polling operation.

It's very unlikely that a router will shut down the TCP/IP connection between the client and the server.  HTTP Keep-Alive is a very popular mechanism for improving browser performance (the TCP/IP connection to port 80 or 443 is kept open even after the HTTP request is done to avoid TCP/IP set-up time.)  Most routers that have been made in the last 10-12 years are aware that HTTP connections may be kept alive for extended periods of time.

It's more likely that a proxy in between the browser and the Lift-based server will drop the connection.  Apache-based proxies have a very limited number of open connections they can handle and they will often close a connection (traffic or no) after 30 seconds.  But this makes no difference to Lift or the browser... they happily re-open the long poll and go on.

Does this help?
 

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Łukasz Kuczera

unread,
Oct 21, 2010, 9:46:38 AM10/21/10
to lif...@googlegroups.com

Yes!  :)

David Pollak

unread,
Oct 21, 2010, 9:50:12 AM10/21/10
to lif...@googlegroups.com

Please write a wiki page about it


>> .
>> For more options, visit this group at
>> http://groups.google.com/group/liftweb?hl=en.
>>
>>
>
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Blog: http://goodstuff.im
> Surf the harmonics
>
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to

Lukasz Kuczera

unread,
Oct 21, 2010, 10:07:12 AM10/21/10
to Lift
http://www.assembla.com/wiki/show/liftweb/Comet_Issues

On Oct 21, 3:50 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> Please write a wiki page about it
> On Oct 21, 2010 6:46 AM, "Łukasz Kuczera" <l.kucz...@jextreme.pl> wrote:
>
> > Yes! :)
>
> > W dniu 2010-10-21 15:44 użytkownik "David Pollak" <
> > feeder.of.the.be...@gmail.com> napisał:
> <liftweb%2Bunsu...@googlegroups.com<liftweb%252Bunsubscribe@googlegroup s.com>

David Pollak

unread,
Oct 21, 2010, 11:38:37 AM10/21/10
to lif...@googlegroups.com


On Thu, Oct 21, 2010 at 7:07 AM, Lukasz Kuczera <kuk...@gmail.com> wrote:
http://www.assembla.com/wiki/show/liftweb/Comet_Issues

Thanks!!
 
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Reply all
Reply to author
Forward
0 new messages