On Fri, Dec 18, 2009 at 1:58 AM, Andrea Peruffo <a.peru...@mcmspa.it> wrote:

> And this does not affect performances? or server side computations?
>

The short answer is that it does increase the amount of HTTP traffic, but
with HTTP keep-alive, that's not a lot of new TCP/IP connections.

On the server side, Lift does its Comet support very early in the HTTP
request/response cycle and the computations for handling the setup/tear down
of the Comet long poll and minimal.

If you have an actual application that has actual performance issues related
to this, there are things that can be done:

   - You can use DNS wildcarding to sent the Comet long poll requests to a
   different, random host and this will allow more than 2 HTTP requests to the
   same server because the browser logic is based on the host name.
   - You can include your own logic for when a Comet long poll operation is
   terminated

But (and I say this based on many years of experience deploying Lift-based
Comet apps and interacting on this list and privately with folks who have
built Lift apps), it's never been an actual production issue and there are
plenty of folks using Lift and Lift's comet long polling in production for
non-trivial applications.


>
> Andrea
>
>
> Il Friday 18 December 2009 10:50:17 Marius ha scritto:
> > This is not a bug. When Lift detects multiple requests for the same
> > session it breaks out the Comet request. This is a safety mechanism in
> > order to avoid HTTP connection starvation on the client side. This is
> > because browsers have a very limited connection pools and the number
> > of parallel HTTP connections are quite low varying from 2 to probably
> > 8 depending on the browser. Note that this "pool" is shared among
> > different tab browsers AND different instances of the same browser.
> >
> > So if you want to test with multiple browsers on you dev env use
> > different browsers such that open your app with Firefox, then open the
> > same app with Chrome etc.
> >
> > Br's,
> > Marius
> >
> > On Dec 18, 11:34 am, Andrea Peruffo <a.peru...@mcmspa.it> wrote:
> > > I have a project where a snippet generates the code for a comet actor,
> > > but when I open two(or more) windows of the same browser on the page I
> > > can see that javascript on both pages start to makes continuous comet
> > > calls.
> > >
> > > I attach a simple project that reproduce the problem.
> > >
> > > Please any fix or workaround??
> > >
> > > Andrea
> > >
> > >  CometPolling.tar.gz
> > > 7KViewDownload
> >
> > --
> >
> > 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<liftweb%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at
> > http://groups.google.com/group/liftweb?hl=en.
>
>
> --
>
> 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<liftweb%2bunsubscr...@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
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 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