|
Posted by Jerry Stuckle on 09/03/07 18:37
Fagner wrote:
> Hi, I'm building a chat engine in php that is going to have a lot of
> simultaneos connections and I was wondering what is the best way to do
> that. So, some questions came to my mind.
> Should I use a database to store the messages?
> if yes, should I use a persistent connection?(php is running as an
> Apache module)
> or maybe SQLite can handle it?
> A single php file will handle too many connections?
>
> Share your opinions. Thanks ;-)
>
PHP is probably not the best way to handle this. There is no way to
notify the client that there has been an update (HTML is
request/response - you must have a request before you can send a
response). Either you're going to have to use javascript to keep
refreshing the window, or the user will need to keep hitting the refresh
button on the browser. Either way would be awkward and put an
unnecessarily high load on the server.
Better would be to do it with something like a Java applet.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|