___MESSAGE HEADERS___ Return-Path: Received: from C1601202A (c1601202-a.alntn1.tx.home.com [24.254.174.79]) by isi1.istrat.com (8.11.0/8.11.0) with SMTP id f8F7djU07351 for ; Sat, 15 Sep 2001 02:39:45 -0500 Reply-To: From: "Tommy Butler" To: Subject: RE: Fork, Thread, or a kick to the head? Date: Sat, 15 Sep 2001 02:49:53 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Status: __END MESSAGE HEADERS__ I'm trying to accomplish the following with the information in perlipc and a few articles I found at webtechniques.com but so far this isn't cutting it. Lets do this in the free-style XML meta-language I mentioned in my previous post. Just for now I'll call it something like xml::CGIquestion... I have a main process making HTTP 1.1 GET queries to different servers with LWP Execution of this procedure in a stacked or looped succession is too slow. The requests are made in succession, before the retrieved pages can be processed for to extract the desired content. The amount of time each request takes to return a result is dependent on the remote machine's response times. This makes things slow, especially for machines that limit the number of hits per second they will accept. (a maximum of 6 queries is getting made to any remote server.) This is taking too long by my standards, and those of my boss. I think it would be faster if I forked off the querying process to child processes with their STDOUT hooked to my STDIN and read from them as they completed or gave up on those which were too slow. Documentation in perlipc and what I could find in a few articles from webtechniques.com is insufficient in providing me with enough details about available implementation methods, pros/cons of using these methods, workarounds for bugs/risks/platform depencencies, documented examples with source code. (now we're really wishfully thinking!) I could try to make the process multi-threaded by using the experimental Thread.pm but I think it is clear why this is the alternative option as opposed to the primary option due to the critical nature of reliability that the resulting code demonstrate in an enterprise mod_perl app which is already several hundred thousand lines of code. (now that's a JAPH!) Not researched very extensively thus far. To be considered as a back-up plan for now. Please provide feedback in the following forms.
Please provide links to better known resources on the topic of forking, my loosely proposed course of action for solving this problem, or instruction first- hand in the process of implementing such a solution with source code and explanation of code. Please provide links to better known resources on the topic of threading, my loosely proposed alternative course of action for solving this problem; and if so doing, please offer suggestions why this would be a superior choice in solving the problem to other proposed methods.
- Tommy Butler, Internet Strategies, Inc. º ° º Everything is Possible. web http://istrat.com email mailto:tommy@istrat.com tel 2 1 4 . 3 9 3 . 1 0 0 0 ext207 fax 8 0 0 . 3 0 7 . 8 1 0 5 2200 North Lamar, Suite 307 º ° º Dallas, TX 75202