[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Be aware of "good old" http-request-based long-polling  XML
Forum Index -> Development
Author Message
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5230
Offline

(from mail converstation)

It happened the second time that I stumbled over this problem, so I "have to" document now!

The old LONPOLLING component opens up an http connection to the server. This connection is not responded immediately - but waits for a certain event to send a response to the client. The client will then initiate a normal rountrip to the server - and internally built up a new connection to listen to the next server side event.

PROBLEM: browsers have limited numbers of connections that they can run in parallel. With each LONGPOLLING component, one connection is created - and not closed!... because it is waiting for a response. If you now start 10 LONGPOLLING connections in parallel then the connections of the browser are occupied and the browser just will not send any http request to the corresponding server anymore.

EVEN MORE PROBLEM: the number of connections is "shared" throughout one browser's instances. If opening 5 browser tabs, each tab holding page with two LONGPOLLING compoennts, then you have 5*2 open connections - and the browser will be the same way of "dead" as if one page had opened 10 LONGPOLLING components.

SOLUTION:
Use WEBSOCKETPOLLING!!!!
It works from logical point of view the same way, but internally uses WebSocket connections where there are "no" limits.

If there is any good reason which makes you believe that you really need classical LONGPOLLING (e.g. customer fire walls were configured in 2006 last time and still do not like web sockets...), then define ONE central LONGPOLLING in the top page of your dialog and do not define LONGPOLLING individually on pages - so that this one LONGPOLLING is shared...

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team