0

I would like to read the RSS feed of a news agency web site and show them with ajax in my own website.

I would like to know how should I develop it to use the least server resources. The web site contains near 150 rss link, so it should update mysql database every 20~30 second for each link. Then save more usable rss value in cache by APC.

When an ajax request came from user, if it exists in APC variables, so echo it, or if doesn't exist, so read from mysql database and save in APC.

I would like to do it with Yii.

Is there any way to do it with low uses of resource?

Fluffeh
  • 33,228
  • 16
  • 67
  • 80
Moein Hosseini
  • 4,309
  • 15
  • 68
  • 106

1 Answers1

0

The best way to do this is to set up an RSS table in your database, then poll it every few minutes using a scheduler (cron is usually the easiest to set up).

This way, when the javascript running on your users' machines polls the RSS, you're not inadvertently DDOSing the RSS provider (I learned this the hard way).

Matt
  • 6,993
  • 4
  • 29
  • 50