launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #09029
Re: disabling longpoll
> You don't need to ask the server anything. The server just has to
> return an appropriate error code if there are too many connections.
> The client can try again in several seconds. This is the simplest fix.
> We already have a cookie that can be used to identify a browser at the
> server end.
I'm not sure we want to have that "intelligent" longpoll logic on the
server side (mostly for performance reason)…
> Or some other behavior. I could also imagine the server accepting the
> new connection and disconnecting the oldest old. If the old client
> tries reconnecting a few seconds later, we end up with round robin
> longish polling.
Another solution would be to restrict longpoll usage to browsers which
support HTML5's local storage and to have the client use it to store the
number of long polling connections (localStorage['longpollconnections']
= 4). This way, the longpoll js code would simply stop creating long
polling connections once the maximum number of connections (-1) is
reached. The only tricky part would be to make sure that the number of
connections is properly decreased when tabs are closed.
--
Raphaël
Follow ups
References