Most Active Discussions (3) Discussions (2) | How to manage max client value using php? Can we create thread application in php? | 10 comments » | Started by Dilip Parmar, PHP Developer at Dew software pvt. ltd. | | Hi, I've been reading theses posts, and there are very nice suggestions over there. I would like to add one more suggestion. You said that you were parsing one XML file that you retrieves remotely, in this case I'd use some sort of cache, maybe you could use memcached. You'll have to establish some sort of cache politics first, this is great for improve the time you spent waiting for remote files to be loaded. That will improve the number of requests you'll be doing from your application too. Then, as I've read from this post, you could use some sort of request queue and then setup some PHP processes in background (or whatever you could setup, I'd make a C++ process to have a better performance in memory management and thread processing) to take that requests from the queue and then do whatever you need to do with it. If you will be using only PHP, you could send, cache, and retrieve data in serialized format between your request receiver PHP script and the queue, this way you can communicate in an easy, fast and unified way. In terms of http server, I've read some guys suggested you to use NGinx or Lighttpd instead of Apache server to attend the requests you will receive directly to your application. These light http servers are faster to attend simple requests and is more likely to be uses for this kind of purposes. To implement the request queue, you could use Shared Memory ( http://ar2.php.net/manual/en/book.shmop.php ) and Semaphores ( http://ar2.php.net/manual/en/book.sem.php ) for synchronization purposes. I hope this helps you to take a good decision. Cheers. By Javier Alejandro Segura, Web Developer en Globant | Job Discussions (6) Don't want to receive email notifications? Adjust your message settings. Stop inappropriate content the moment it is posted. Send me an email for each new discussion » LinkedIn values your privacy. At no time has LinkedIn made your email address available to any other LinkedIn user without your permission. © 2011, LinkedIn Corporation. |
No comments:
Post a Comment