maexus Posted March 2, 2008 Share Posted March 2, 2008 Ok, so I have 3 xml feeds. To make things simple, lets say they are ATOM feeds. Not that it matters. These feeds come from 3 different sources so they contain 3 different kinds of data. The data isn't important either. What is important is the timestamp of these entries. What I want to do is merge all the entries from all 3 of the feeds and then sort them chronologically using the entry timestamps. This stream of entries would be available for public viewing so I need a way to keep the resources down. Now, I have thought about this and really I'm just asking for advice, not an answer. My first thought was to parse one feed at a time, putting all the data into the array then sorting the array via the timestamps. This would be done in real time every time there was a refresh, which can tax some servers unless I cached the feeds. The same thing could be done with a database but that would mean I would need to setup a cronjob to monitor the feeds so the stream is nice and updated when someone visits. This would work except my host only allows 30 minute incremental cron jobs. Done reading all that? Good. Here is my questions in condensed form 1) What, in your opinion, is the best way to merge and sort the data 2) Do you think the array or the database is the best approach. Or do you think it's all rubbish and have a 3rd suggestion? Quote Link to comment Share on other sites More sharing options...
maexus Posted March 3, 2008 Author Share Posted March 3, 2008 bump? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.