views:

303

answers:

1

i've read that php doesn´t scale well if a lot of users are using your comet implementation? is that because of the apache server or the php language?

what is a socket server and does it fix that problem?

someone that has set up a php comet server for a lot of users that could give some advice?

+1  A: 

i've read that php doesn´t scale well if a lot of users are using your comet implementation?

Where?

There's a lot of nonsense published about scaling and programming languages.

Certainly there are isues with using PHP for comet - but nothing to do with concurrency, other than the fact that comet does not scale well (a non-coment web based app is not limited by the number of concurrent sessions, and uses less memory).

The main consideration is memory-management: PHP was designed for request-reply type operation - where all the data can be cleared down between iterations. If you are writing OO code in your server, then you should definitely think about using the circular reference checker.

what is a socket server and does it fix that problem?

err....you don't know? A socket server is a generic description of a server which uses sockets to communicate - e.g. a webserver, a mail server a file server....

Although it's possible to implement a socket server in PHP (or in many other languages) it doesn't the address the memory management problem in PHP.

C.

symcbean
i´ve implemented php on Glassfish using quercus. do you think this will solve the memory (one request one process) problem?
weng
Doubt it - if you can live with the downsides, then the java garbage collection is more appropriate for interactive processes (i.e. NOT conventional http apps) but the problem lies in the PHP memory management. Just get it to keep telling you about its memory usage. It all depends on how you create/destroy objects and arrays in the PHP code. Make sure it reports back on memory usage at regular intervals.C.
symcbean