On 7/13/07, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:
> On 7/13/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote: > This isn't possible since you can't request a connection to the client's > machine. Only the other way around. hmm... in that case perhaps the open connection could be employed and the feature used selectively; only on certain pages for instance ? im thinking mainly of a monitoring page; like an app that shows a servers state, or stock quotes or something. the main reason i dont like a javascript timer refreshing the page is sometimes you dont want the whole page refreshed; especially when halfway through filling out a form on the page ;) -nathan
Well, that's why AJAX is there, you do a check to a server to see if there's any new data to parse, if so, then you update (and probably only one or two divs on your site, and not the whole page) Keeping connection open isn't quite bad for sites that are visited a lot, as for each connection, a new port is opened to handle a client connection. While you think you're connected to port 80, it is actually redirected to another port (mostly from 3000 onwards). So, if you have a lot of visiters, you might reach the limit of ports, 65536 (0-65535). Some of them are already in use, so you end up to have a limit of about 65530 connections to keep open. For a normal site this isn't a problem, but if you count on shared hosts, with let's say 20 sites, then they can all handle about 3200 connections. Half of the users has probably more then one window open, which means another connection. So you end up to have a maximum of about 2000 visiters at same time for each site. Tijnema
On 7/13/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote: > > On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote: > > > On 7/13/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote: > > > I haven't looked at the code for Xaja and in no way do I want to > > > subtract from its potential, but I'm going to guess that in some way > > it > > > holds the HTTP connection open and as such is an expensive feature. > > > Also, I'm not entirely sure, but isn't that the principle that > > Comet > > > uses? > > > > As i said ive only imagined such a feature. In my imagination i > > wonder if it is possible to > > track the clients address in a data structure within the application. > > Then a connection could be > > established whenever a push was needed. > > This isn't possible since you can't request a connection to the client's > machine. Only the other way around. > > > I also think the app would have to track the last page > > a user requested in order to realize such an implementation. This > > *should* be feasible using > > sessions because whenever the client makes a new request the last page > > variable could be updated. > > I havent seen nor heard of Comet; would you mind providing a link? > > http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications > > Cheers, > Rob. > -- > ........................................................... > SwarmBuy.com - http://www.swarmbuy.com > > Leveraging the buying power of the masses! > ........................................................... >
-- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php