[Lift] Re: Avoiding polling when using Comet. Reverse AJAX

2009-04-22 Thread przemek.pokrywka

It is 10 sec actually at Comet chat example.
Not very good for high-traffic public portals.

Przemek

On Apr 21, 7:21 pm, marius d. marius.dan...@gmail.com wrote:
 But what is the problem with long pooling if a request is done every x
 minutes (if server does not have any message for this client)?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Avoiding polling when using Comet. Reverse AJAX

2009-04-22 Thread Alexander Kellett

are you sure this isn't the gc poll? i agree 10 seconds is too short
(thats a lot of traffic...), but its a very quick operation, its not
an actual poll on the page afaiu

On Wed, Apr 22, 2009 at 8:54 AM, przemek.pokrywka
przemyslaw.pokry...@gmail.com wrote:

 It is 10 sec actually at Comet chat example.
 Not very good for high-traffic public portals.

 Przemek

 On Apr 21, 7:21 pm, marius d. marius.dan...@gmail.com wrote:
 But what is the problem with long pooling if a request is done every x
 minutes (if server does not have any message for this client)?

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Avoiding polling when using Comet. Reverse AJAX

2009-04-22 Thread marius d.

Hold on guys ... are you talking about the online demo application
http://demo.liftweb.net/ ? ... If so, note that there is also a clock
Comet Actor that every 10 seconds is updating the time in the browser.
It is the application intent not the comet implementation. Note that
by default the COMET request timeout is 140 seconds.

Br's,
Marius

On Apr 22, 10:53 am, Alexander Kellett lypa...@gmail.com wrote:
 are you sure this isn't the gc poll? i agree 10 seconds is too short
 (thats a lot of traffic...), but its a very quick operation, its not
 an actual poll on the page afaiu

 On Wed, Apr 22, 2009 at 8:54 AM, przemek.pokrywka

 przemyslaw.pokry...@gmail.com wrote:

  It is 10 sec actually at Comet chat example.
  Not very good for high-traffic public portals.

  Przemek

  On Apr 21, 7:21 pm, marius d. marius.dan...@gmail.com wrote:
  But what is the problem with long pooling if a request is done every x
  minutes (if server does not have any message for this client)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Avoiding polling when using Comet. Reverse AJAX

2009-04-22 Thread David Pollak
On Wed, Apr 22, 2009 at 12:53 AM, Alexander Kellett lypa...@gmail.comwrote:


 are you sure this isn't the gc poll?


It's not the GC ping


 i agree 10 seconds is too short
 (thats a lot of traffic...)


10 seconds, as Marius pointed out, is the periodicity of the app because the
clock is updating every 10 seconds.  This means that there's an update to a
comet component (the clock) every 10 seconds.


 , but its a very quick operation, its not
 an actual poll on the page afaiu


There's a very fast path in the code for the poll and it's all done over an
http keep-alive anyway.

If there's anyone who has an idea better than long polling for server to
client push (other than HTML 5/WebSockets), I'm all ears.

If the amount of traffic that long polling creates on your site because of
long polling exceeds your capacity (in my calculations, 100,000 active
sessions per dual core server machine), then you can remove the comet
component.

Thanks,

David




 On Wed, Apr 22, 2009 at 8:54 AM, przemek.pokrywka
 przemyslaw.pokry...@gmail.com wrote:
 
  It is 10 sec actually at Comet chat example.
  Not very good for high-traffic public portals.
 
  Przemek
 
  On Apr 21, 7:21 pm, marius d. marius.dan...@gmail.com wrote:
  But what is the problem with long pooling if a request is done every x
  minutes (if server does not have any message for this client)?
 
  
 

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Avoiding polling when using Comet. Reverse AJAX

2009-04-22 Thread przemek.pokrywka

Thanks for explanation guys!
I wasn't aware of the clock.
A single poll every 140s sounds perfectly reasonable to me.
I'm not aware of any better alternatives for long polling, yet
fortunately I don't desperately need one :)

Now I'm no longer concerned about Comet performance in my planned
Liftweb app, thanks!

Przemek

On Apr 22, 5:41 pm, David Pollak feeder.of.the.be...@gmail.com
wrote:
 On Wed, Apr 22, 2009 at 12:53 AM, Alexander Kellett lypa...@gmail.comwrote:



  are you sure this isn't the gc poll?

 It's not the GC ping

  i agree 10 seconds is too short
  (thats a lot of traffic...)

 10 seconds, as Marius pointed out, is the periodicity of the app because the
 clock is updating every 10 seconds.  This means that there's an update to a
 comet component (the clock) every 10 seconds.

  , but its a very quick operation, its not
  an actual poll on the page afaiu

 There's a very fast path in the code for the poll and it's all done over an
 http keep-alive anyway.

 If there's anyone who has an idea better than long polling for server to
 client push (other than HTML 5/WebSockets), I'm all ears.

 If the amount of traffic that long polling creates on your site because of
 long polling exceeds your capacity (in my calculations, 100,000 active
 sessions per dual core server machine), then you can remove the comet
 component.

 Thanks,

 David





  On Wed, Apr 22, 2009 at 8:54 AM, przemek.pokrywka
  przemyslaw.pokry...@gmail.com wrote:

   It is 10 sec actually at Comet chat example.
   Not very good for high-traffic public portals.

   Przemek

   On Apr 21, 7:21 pm, marius d. marius.dan...@gmail.com wrote:
   But what is the problem with long pooling if a request is done every x
   minutes (if server does not have any message for this client)?

 --
 Lift, the simply functional web frameworkhttp://liftweb.net
 Beginning Scalahttp://www.apress.com/book/view/1430219890
 Follow me:http://twitter.com/dpp
 Git some:http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---



[Lift] Re: Avoiding polling when using Comet. Reverse AJAX

2009-04-21 Thread marius d.

Comet is also known as long polling especially when browsers are
involved. That's because:

1. When timeout occurs  ... after x seconds/minutes client needs to re-
establish connection
2. Client reconnects after response is provided by server

But what is the problem with long pooling if a request is done every x
minutes (if server does not have any message for this client)?

Br's,
Marius

On Apr 21, 5:35 pm, przemek.pokrywka przemyslaw.pokry...@gmail.com
wrote:
 Hello,

 Is is possible to use Comet in Liftweb without frequent polling by
 Browser?
 When I sniffed traffic between my browser (FF3) and demo app (Comet
 chat example), I observed a regular stream of HTTP GETs.

 Przemek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@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
-~--~~~~--~~--~--~---