RE: [PHP] Multiple Threads?

2002-04-15 Thread Matthew Walker

I think what I'm going to end up doing, is using a perl CGI script to do
this part. I /know/ perl can do it easily, and I won't have to hack
together my own threading code.

Thanks for the suggestions though.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Richard Archer [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 14, 2002 6:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Multiple Threads?

At 9:25 PM -0600 13/4/02, Matthew Walker wrote:

I don't remember the name of the module offhand, but once upon a time,
I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query
them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.

You could system() or shell_exec() an external program/script which
forked off 3 children to perform the queries. You would then need to
parse the script output for the data you need. system() would require
you to capture the script output via output buffering.

If you want to use a CGI version of PHP as the external program the
functions described at http://www.php.net/manual/en/ref.pcntl.php are
what you need.

This is a very neat idea. I hope I remember this when I need it :)

 ...R.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Multiple Threads?

2002-04-14 Thread Cal Evans

PHP can fork but the docs say not to do it in a web server environment.
basically, it's only usable on *nix machines and in a shell scripting
environment.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 13, 2002 10:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Multiple Threads?


I don’t remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.

Does anyone know if such a thing exists for PHP?

Matthew Walker
Senior Software Engineer
ePliant Marketing


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002


--
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




Re: [PHP] Multiple Threads?

2002-04-14 Thread Richard Archer

At 9:25 PM -0600 13/4/02, Matthew Walker wrote:

I don't remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.

You could system() or shell_exec() an external program/script which
forked off 3 children to perform the queries. You would then need to
parse the script output for the data you need. system() would require
you to capture the script output via output buffering.

If you want to use a CGI version of PHP as the external program the
functions described at http://www.php.net/manual/en/ref.pcntl.php are
what you need.

This is a very neat idea. I hope I remember this when I need it :)

 ...R.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Multiple Threads?

2002-04-13 Thread Matthew Walker

I don’t remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.
 
Does anyone know if such a thing exists for PHP?
 
Matthew Walker
Senior Software Engineer
ePliant Marketing
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php