Hi,
I'm wondering if I can get by with using PHP for this rather than java:
I'm writing an program that will run in an automated fashion (crontab) and fire off page requests at a fixed interval, with potentially hundreds or thousands of requests per each batch.
If I were using java, I'd fork off all of these requests into separate threads so the program wouldn't have to wait for the return trip back from the server, as I think the network lag will be bottleneck in the program. But I don't want to mess with Java if I can do it in php!
What I'm thinking of trying with php is this: the app loads up all the queries, say, 1000 at a time, and then fires each one off to another php page on the server, which in itself executes the search and processes the results. that way the calling page won't have to do them in sequential order (which would take forever), and the recieving page will be called many times very quickly, and will spawn as many instances of itself as is needed. this would sort of mimic multithreading, and would work fine for my purposes because the recieving page won't return anything to the caller, it will handle the results all on it's own.
Can someone tell me if this is correct/will work, or am I missing something? I'll be running it on Apache. Also I'm open to any other advice on how to do this, thanks!!
-rdrnnr