Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-16 Thread David Négrier
I don't believe there is an equivalent in other languages. In Java, the 
closest match might be DWR for the Reverse Ajax approach, or maybe GWT 
for the no Javascript approach.
I'm not completely sure, but I think nobody took exactly the same 
approach yet, because Xaja opens a large number of processes and 
connexions and most people believe that its architecture cannot adapt to 
thousands of users. For my part, since the vast majority of the 
applications I develop have less than 100 concurrent users, Xaja's 
architecture is perfect, and I hope it will spread in other frameworks 
and languages, because I find it really easier to develop applications 
with a events oriented architecture.


David.


Sancar Saran a écrit :

On Saturday 14 July 2007 15:01:13 David Négrier wrote:
Hi 

I just watching your screen cast, it has very good ideas. I wonder does any 
other language has same kind of aproach.


Later or sooner this kind of aproach become must in web business.

Regards

Sancar.

  

Indeed, Xaja relies on the keeping of an open connexion between the server
and the browser.
In fact, it uses, the Comet approach (which is a pain to implement in
Javascript because the IE code and the Firefox code are completely
different).
(more information here:
http://www.thecodingmachine.com/cmsDoc/xaja/trunk/architecture.html)

The whole idea behind Xaja is to built a complete framework on top of the
Comet-like javascript library that will enable the developer to write as
few Javascript as possible. So, indeed, through the XajaController
object, we are implementing a data driven programming library on top of
the classical request/response HTTP protocol.

Regarding performances: Indeed, since a connexion is kept open for each
browser, this consumes a few connexions on the server (that's not a big
problem). Each process also takes some memory. Xaja is still in an early
stage of development and I haven't had the opportunity to run a full
performance test, but basically, right now, I can tell that a simple
applications takes 5 Mo of RAM per client. Which means that for 100
concurrent users, you need 500 Mo of RAM on your server. Now, the vast
majority of the servers have less than 100 concurrent users, and at this
early point in the development cycle of Xaja, I wouldn't recommend
installing Xaja on a server that has more than 100 concurrent users! ;)

Regards,
David.



  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-15 Thread Sancar Saran
On Saturday 14 July 2007 15:01:13 David Négrier wrote:
Hi 

I just watching your screen cast, it has very good ideas. I wonder does any 
other language has same kind of aproach.

Later or sooner this kind of aproach become must in web business.

Regards

Sancar.

 Indeed, Xaja relies on the keeping of an open connexion between the server
 and the browser.
 In fact, it uses, the Comet approach (which is a pain to implement in
 Javascript because the IE code and the Firefox code are completely
 different).
 (more information here:
 http://www.thecodingmachine.com/cmsDoc/xaja/trunk/architecture.html)

 The whole idea behind Xaja is to built a complete framework on top of the
 Comet-like javascript library that will enable the developer to write as
 few Javascript as possible. So, indeed, through the XajaController
 object, we are implementing a data driven programming library on top of
 the classical request/response HTTP protocol.

 Regarding performances: Indeed, since a connexion is kept open for each
 browser, this consumes a few connexions on the server (that's not a big
 problem). Each process also takes some memory. Xaja is still in an early
 stage of development and I haven't had the opportunity to run a full
 performance test, but basically, right now, I can tell that a simple
 applications takes 5 Mo of RAM per client. Which means that for 100
 concurrent users, you need 500 Mo of RAM on your server. Now, the vast
 majority of the servers have less than 100 concurrent users, and at this
 early point in the development cycle of Xaja, I wouldn't recommend
 installing Xaja on a server that has more than 100 concurrent users! ;)

 Regards,
 David.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-14 Thread Richard Lynch
You can't even be guaranteed to GET the client's IP address in their
request, much less assume that it's going to be the same when you want
to push data out to it!!!

So any Xaja-like technology has to rely on keeping the HTTP connection
open, really...

Does seem pretty cool, though probably not scalable for heavily loaded
servers.

On Fri, July 13, 2007 1:59 pm, Nathan Nobbe wrote:
 On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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.  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?

 -nathan

 On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote:

 On Fri, 2007-07-13 at 14:28 -0400, Nathan Nobbe wrote:
  I have imagined being able to connect to a client browser and push
 changes
  to the client rather than have something sit on the client side
 and
  periodically wait for updates.
  or only update when the client refreshes the page manually.  both
 of
 those
  antiquated options are ugly.  the push technique discussed in this
 email
 is
  essentially leveraging
  the Observer design pattern.  As i said i imagined it could be
 achieved
 via
  ajax, but wasnt sure on the implementation.
  im curious now to see it in action and pour through the Xaja code
 for
 the
  answer to the riddle!
  btw.
  i found myelf thinking of the pronouciation as ZahJah.

 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?

 Cheers,
 Rob.
 --
 ...
 SwarmBuy.com - http://www.swarmbuy.com

 Leveraging the buying power of the masses!
 ...




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-14 Thread David Négrier
Indeed, Xaja relies on the keeping of an open connexion between the server
and the browser.
In fact, it uses, the Comet approach (which is a pain to implement in
Javascript because the IE code and the Firefox code are completely
different).
(more information here:
http://www.thecodingmachine.com/cmsDoc/xaja/trunk/architecture.html)

The whole idea behind Xaja is to built a complete framework on top of the
Comet-like javascript library that will enable the developer to write as
few Javascript as possible. So, indeed, through the XajaController
object, we are implementing a data driven programming library on top of
the classical request/response HTTP protocol.

Regarding performances: Indeed, since a connexion is kept open for each
browser, this consumes a few connexions on the server (that's not a big
problem). Each process also takes some memory. Xaja is still in an early
stage of development and I haven't had the opportunity to run a full
performance test, but basically, right now, I can tell that a simple
applications takes 5 Mo of RAM per client. Which means that for 100
concurrent users, you need 500 Mo of RAM on your server. Now, the vast
majority of the servers have less than 100 concurrent users, and at this
early point in the development cycle of Xaja, I wouldn't recommend
installing Xaja on a server that has more than 100 concurrent users! ;)

Regards,
David.


Nathan Nobbe a écrit :
 I understand the use of AJAX to only update a subset of the DOM on a page,
 rather than rebuild the entire page.  What i was getting at though is
 eliminating
 the busy-wait model by using the Observer pattern to push changes to the
 client
 only when the data has changed on the server side.  This is decidedly more
 efficient in general and is more commonly referred to as *event driven
 programming*
 or *data driven programming*.  it sounds like the only way to implement
such
 a model
 over HTTP is by keeping the connection open; which in some circumstances
may
 be appropriate.
 I have to say though, I never thought of using busy waiting to update
just a
 portion
 of the DOM.  It seems like almost a no-brainier, but since i havent worked
 w/ AJAX
 much it just never crossed my mind.  That sounds like the most practical
 approach in
 general.

 -nathan


 On 7/13/07, Tijnema [EMAIL PROTECTED] wrote:

 On 7/13/07, Nathan Nobbe [EMAIL PROTECTED] wrote:
   On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:
  
   On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote:
 On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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 

[PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Colin Guthrie
David Négrier wrote:
 Regarding the way Xaja is pronounced well  that's a good
 question.
 Actually, I'm French and my pronunciation is... well... French ;), so I
 won't give you any advice on how to pronounce it.
 However, I will present Xaja in San Francisco at the Ajax Experience (a
 conference about Web 2.0 development). I will ask some people there if
 they can give me a clue on the way to pronounce it in English ;).

I reckon it should be pronounced zah-jah in English. (the same Z sound
as in Xavier)

I wouldn't listen to the Americans in San Fran. Americans always
pronounce English in a weird and colourful way (and yes, colourful
has a U in it. get that right too!!!)

:p

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Daniel Brown

On 7/13/07, Colin Guthrie [EMAIL PROTECTED] wrote:

I reckon it should be pronounced zah-jah in English. (the same Z sound
as in Xavier)

I wouldn't listen to the Americans in San Fran. Americans always
pronounce English in a weird and colourful way (and yes, colourful
has a U in it. get that right too!!!)

:p

Col


   I actually agree with Colin on part one and 2(a) of his
message for the most part.  I wouldn't enunciate a hard J on the
second syllable, though, rather trading it for a 'zh' sound.
Immediately upon reading it, I considered it to sound like ZAH-zhah.

   With regards to 2a, I agree that my fellow Americans over on the
west coast, specifically San Francisco, speak a bit different than
those of us in the northeast.  Nowhere near as different as the south,
but that's not the point.

   On points 2b and 2c (Americans always pronounce English in a
weird and colourful way, and, yes, colourful has a U in it,
respectively), I don't completely agree.  Sure, we bastardized the
language a bit, but considering Europeans bastardized it from Germanic
in the first place, it's only fair. ;-P

   And to you, yes, colourful has a U in it.  Well, guess what
it does for us, too!  Just not in the color part, but rather the
ful part.  So there!

   Finally, since I'm already off-topic, I may as well at least
commend our more eastern friends (read: non-American English speakers)
on understanding the difference between - and correctly using - the
words theatre versus theater, and centre versus center
correctly.

   /soapbox

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Jason Pruim


On Jul 13, 2007, at 10:31 AM, Daniel Brown wrote:




   And to you, yes, colourful has a U in it.  Well, guess what
it does for us, too!  Just not in the color part, but rather the
ful part.  So there!



It's all about U isn't it? ;)



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Robert Cummings
On Fri, 2007-07-13 at 10:40 -0400, Jason Pruim wrote:
 On Jul 13, 2007, at 10:31 AM, Daniel Brown wrote:
 
 
 
 And to you, yes, colourful has a U in it.  Well, guess what
  it does for us, too!  Just not in the color part, but rather the
  ful part.  So there!
 
 
 It's all about U isn't it? ;)

Humour us!

:)

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Robert Cummings
On Fri, 2007-07-13 at 10:31 -0400, Daniel Brown wrote:
 On 7/13/07, Colin Guthrie [EMAIL PROTECTED] wrote:
  I reckon it should be pronounced zah-jah in English. (the same Z sound
  as in Xavier)
 
  I wouldn't listen to the Americans in San Fran. Americans always
  pronounce English in a weird and colourful way (and yes, colourful
  has a U in it. get that right too!!!)
 
  :p
 
  Col
 
 I actually agree with Colin on part one and 2(a) of his
 message for the most part.  I wouldn't enunciate a hard J on the
 second syllable, though, rather trading it for a 'zh' sound.
 Immediately upon reading it, I considered it to sound like ZAH-zhah.

I'm with Colin, I'd pronounce it ZahJah. Yah, Yah, that's would I would
say.

But really, it's up to it's creator how they would like it to be said :)

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Colin Guthrie
Daniel Brown wrote:
And to you, yes, colourful has a U in it.  Well, guess what
 it does for us, too!  Just not in the color part, but rather the
 ful part.  So there!

D'oh! You got me there :p

Col

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Nathan Nobbe

I have imagined being able to connect to a client browser and push changes
to the client rather than have something sit on the client side and
periodically wait for updates.
or only update when the client refreshes the page manually.  both of those
antiquated options are ugly.  the push technique discussed in this email is
essentially leveraging
the Observer design pattern.  As i said i imagined it could be achieved via
ajax, but wasnt sure on the implementation.
im curious now to see it in action and pour through the Xaja code for the
answer to the riddle!
btw.
i found myelf thinking of the pronouciation as ZahJah.

-nathan

On 7/13/07, Colin Guthrie [EMAIL PROTECTED] wrote:


Daniel Brown wrote:
And to you, yes, colourful has a U in it.  Well, guess what
 it does for us, too!  Just not in the color part, but rather the
 ful part.  So there!

D'oh! You got me there :p

Col

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Robert Cummings
On Fri, 2007-07-13 at 14:28 -0400, Nathan Nobbe wrote:
 I have imagined being able to connect to a client browser and push changes
 to the client rather than have something sit on the client side and
 periodically wait for updates.
 or only update when the client refreshes the page manually.  both of those
 antiquated options are ugly.  the push technique discussed in this email is
 essentially leveraging
 the Observer design pattern.  As i said i imagined it could be achieved via
 ajax, but wasnt sure on the implementation.
 im curious now to see it in action and pour through the Xaja code for the
 answer to the riddle!
 btw.
 i found myelf thinking of the pronouciation as ZahJah.

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?

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Nathan Nobbe

On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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.  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?

-nathan

On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote:


On Fri, 2007-07-13 at 14:28 -0400, Nathan Nobbe wrote:
 I have imagined being able to connect to a client browser and push
changes
 to the client rather than have something sit on the client side and
 periodically wait for updates.
 or only update when the client refreshes the page manually.  both of
those
 antiquated options are ugly.  the push technique discussed in this email
is
 essentially leveraging
 the Observer design pattern.  As i said i imagined it could be achieved
via
 ajax, but wasnt sure on the implementation.
 im curious now to see it in action and pour through the Xaja code for
the
 answer to the riddle!
 btw.
 i found myelf thinking of the pronouciation as ZahJah.

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?

Cheers,
Rob.
--
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Robert Cummings
On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote:
  On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Nathan Nobbe

On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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

On 7/13/07, Robert Cummings [EMAIL PROTECTED] wrote:


On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote:
  On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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!
...



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Tijnema

On 7/13/07, Nathan Nobbe [EMAIL PROTECTED] wrote:

 On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:

 On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote:
   On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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



Re: [PHP] Re: Announcing Xaja, a PHP Reverse Ajax framework

2007-07-13 Thread Nathan Nobbe

On 7/13/07, Tijnema [EMAIL PROTECTED] wrote:
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)


I understand the use of AJAX to only update a subset of the DOM on a page,
rather than rebuild the entire page.  What i was getting at though is
eliminating
the busy-wait model by using the Observer pattern to push changes to the
client
only when the data has changed on the server side.  This is decidedly more
efficient in general and is more commonly referred to as *event driven
programming*
or *data driven programming*.  it sounds like the only way to implement such
a model
over HTTP is by keeping the connection open; which in some circumstances may
be appropriate.
I have to say though, I never thought of using busy waiting to update just a
portion
of the DOM.  It seems like almost a no-brainier, but since i havent worked
w/ AJAX
much it just never crossed my mind.  That sounds like the most practical
approach in
general.

-nathan


On 7/13/07, Tijnema [EMAIL PROTECTED] wrote:


On 7/13/07, Nathan Nobbe [EMAIL PROTECTED] wrote:
  On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote:
 
  On Fri, 2007-07-13 at 14:59 -0400, Nathan Nobbe wrote:
On 7/13/07, Robert Cummings [EMAIL PROTECTED] 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