What is the best way to process live data?

From: Date: Sat, 29 Aug 2009 21:31:05 +0000
Subject: What is the best way to process live data?
Groups: php.general 
Request: Send a blank email to php-general+get-297486@lists.php.net to get a copy of this message
For those of you that remember (not likely but anyway) I am working on some code that splits CLF records and feeds them into a database. What I need to do now is automate it. So what I have is a program (urlsnarf) that redirects its output (simple "cmd > file.txt") to a file. The script currently processes this output line by line and does the SQL foo - i.e. script.php /the/file.txt Should I: 1) do away with redirecting the output from urlsnarf to a file and have the script run the process and have some kind of handle on it; foreach kinda thing? 2) keep outputting the info to a persistent file, reading any new appends and periodically cull this file. Seems like a waste of I/O if #1 is possible. 3) other options? Any help/push in the right direction is appreciated. Thanks.

« previous php.general (#297486) next »