albertlee Posted November 8, 2005 Posted November 8, 2005 Recently, I am told that, application server, like PHP, can handle more simultaneous responds from users to transact with database server, like MySQL...unlike clientside only program, MySQL only allows a few simultaneous connections to it... and more over, it is also more risky since MySQL database URL is exposed..... I am more concentrating on: why can, eg, php, transact with database more efficiently than clientside-only program<--> database server??? any explanation to this?? thanks
Klaynos Posted November 8, 2005 Posted November 8, 2005 Because it's local to the machine, it doesn't have to send data such long distances, there will also be less total processor time required over both client and server as less requests have to be made to the server...
RyanJ Posted November 8, 2005 Posted November 8, 2005 I'm not really shure about this - I'm at about 50/50. Because PHP is interprited it has to work through the PHP program its self in any case, this will slow it down by a bit. I suppose as with most computer things it depends on the size of the project Cheers, Ryan Jones
albertlee Posted November 9, 2005 Author Posted November 9, 2005 thanks Klaynos and Ryan, but.. to Klaynos, in my case, the MySQL database server is hardware entity which is not bound with the php server or simply on any client's computer..., therefore, the distance from client or php server to the database is the same basically. So, is there another explanation on this structure? btw, why is there less request from php than client side program to the database server? to Ryan, well, I was told that php-database will be faster than client-database..... Any one can help here?? thanks alot
Klaynos Posted November 9, 2005 Posted November 9, 2005 I would say it depends what the client application is writen in, as it could easily be written in php As for the question about number of requests it's because the client requests test.php script from the server which executes on the server and does all the database intereactions on the server, one request. If you have a script on your local machine that will (most probably depending on how it is written) make a connection request to the server then make a request for every sql query it executes.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now