You can run 5 or 6 copies of PHP just fine, way easier than trying to hack
together some sort of multi-threading inside of PHP.  Just be sure you use a
database or other thread-safe storage mechanism.  Writing to a common file,
for example, would be pretty bad.  Actually, under Linux, for small data
blocks (4k?) you can safely use fopen(,'a');fwrite();fclose()

How that compares to doing the thing in C++ depends a little bit on your
relative strengths in C++/PHP, but you'd have to a be a multi-threading C++
guru and a total newbie to PHP for the C++ solution to be easier.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Robert Schultz <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 30, 2001 7:11 AM
Subject: Asynchronous SNMP?


> I'm working on a project that involves a lot of SNMP data gathering.
> I was wondering if it's possible to have a multi-threaded PHP script.
> Basically the SNMP queries I'm running are taking a long time to complete
> (several seconds). However I found that running multiple at the same time
> does not slow down the response time of any of the others. So I was
> wondering how easy it would be to get 5 or 6 SNMP queries running at the
> same time.
>
> If PHP is unable to, I'm going to have to write a C/C++ app, that will do
> it, then insert the results into a database. Then the PHP script will grab
> from there.
>
> Any suggestions?
>
> --
> Robert Schultz - [EMAIL PROTECTED]
> Knowledge Engineer - Adelphia Communications
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to