Re: [PHP] Best method for threading?
On Wed, 12 Jan 2005, Galen wrote: I'm working on a web spider application where the server has considerable latency in serving the information I require, but simultaneous requests do not have a significant performance hit. I have a nice little class that handles all the sessions, cookies, etc perfectly. What's the best way to basically hand off a bunch of threads to access this information without hanging up the execution of my script? I plan to handle inter-thread coordination via MySQL and code in the main script. I've done threads before like this and have had great luck, but all my solutions have been hack-ish at best. What are the cleanest solution for this? What do you all do to handle situations like this? I will be running PHP 4.3.1.0 under Linux and Mac OS X, depending on location. Thoughts anybody? You don't need threads for this. See http://php.net/curl_multi_exec PHP5 only, but there is nothing PHP5-specific about the multi stuff in the PHP5 curl extension, so you can just move it to PHP4. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best method for threading?
I'm working on a web spider application where the server has considerable latency in serving the information I require, but simultaneous requests do not have a significant performance hit. I have a nice little class that handles all the sessions, cookies, etc perfectly. What's the best way to basically hand off a bunch of threads to access this information without hanging up the execution of my script? I plan to handle inter-thread coordination via MySQL and code in the main script. I've done threads before like this and have had great luck, but all my solutions have been hack-ish at best. What are the cleanest solution for this? What do you all do to handle situations like this? I will be running PHP 4.3.1.0 under Linux and Mac OS X, depending on location. Thoughts anybody? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best method for threading?
Galen wrote: I'm working on a web spider application where the server has considerable latency in serving the information I require, but simultaneous requests do not have a significant performance hit. I have a nice little class that handles all the sessions, cookies, etc perfectly. What's the best way to basically hand off a bunch of threads to access this information without hanging up the execution of my script? I plan to handle inter-thread coordination via MySQL and code in the main script. I've done threads before like this and have had great luck, but all my solutions have been hack-ish at best. What are the cleanest solution for this? What do you all do to handle situations like this? I will be running PHP 4.3.1.0 under Linux and Mac OS X, depending on location. Thoughts anybody? nonblocking sockets and socket_select in a while loop. Or execute more processes. php does not have thread support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best method for threading?
On Wed, 12 Jan 2005 04:13:17 -0800, Galen [EMAIL PROTECTED] wrote: What do you all do to handle situations like this? If you need threads then use a language that has threads. I'd go with Java or Perl. -- Greg Donald Zend Certified Engineer http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best method for threading?
nonblocking sockets wont work with select, blocking is ok On Sat, 15 Jan 2005 19:30:14 +0100, Marek Kilimajer [EMAIL PROTECTED] wrote: Galen wrote: I'm working on a web spider application where the server has considerable latency in serving the information I require, but simultaneous requests do not have a significant performance hit. I have a nice little class that handles all the sessions, cookies, etc perfectly. What's the best way to basically hand off a bunch of threads to access this information without hanging up the execution of my script? I plan to handle inter-thread coordination via MySQL and code in the main script. I've done threads before like this and have had great luck, but all my solutions have been hack-ish at best. What are the cleanest solution for this? What do you all do to handle situations like this? I will be running PHP 4.3.1.0 under Linux and Mac OS X, depending on location. Thoughts anybody? nonblocking sockets and socket_select in a while loop. Or execute more processes. php does not have thread support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php