I want to build an web application that does these:
(1) Collects and parses XML files (from a URL) every 5-10 minutes
(2) Screen scrapes data (from a URL) every 5-10 minutes
(3) Puts the data from (1)+(2) to MySQL database
(4) Checking and updating some database records when this is necessary (maybe every 5 minutes)
(5) PHP manages and presents the data to the end user
Yii handles the (5) but how about (1),(2),(3) and (4)? PHP is a scripting language and I don’t know if it possible to complete these tasks (time based) with it.
Should I make a Java program for tasks 1,2,3,4 at the database server OR web server?
To solve points 1 to 4 you should probably use any scripting language + cron or any other scheduling software. Since you want to do point 5 in yii its a good idea to use yii for points 1-4 as well. You can easily create console application using yii and consol commands.
You should use curl to get the xml data. Its very fast. I think you want to put the xml data into database? Did you want to store the raw xml, or the parsed data?
If you want to store the raw xml into db you could use mysql command line. If you want to store the xml data parsed you could use php it. php is not the fastest xml parser. But you could then create an extension in yii. Which allows you put all "code" in one place and class. Which parser stores, shows and so on the data ( Easier to maintain imho ) If you want "real" speed. And know C++. ( Maybe even without, cause its realy easy ) http://www.ambiera.com/irrxml/ could be something for you. Combine it with mysql and you go.