[drupal-devel] Swiss army knife of RSS feeds - SQL Search patch

Seth Cohn sethcohn at gnuhampshire.org
Tue Sep 27 01:57:16 UTC 2005


> I hacked this into Drupal search once too. Just as a proof of concept. It got
> my server completely to its knees.

Yeah, I have no doubt that with heavy traffic, the # of SQL queries
for this would be too much.  SQL search is already heavier than using
the normal search module, and the flexibility of allowing just about
any combo of nodetype, taxonomy, user and keyword is sure to come at a
price tag.

> * For a feed we must load everything trough a bootstrap. No need to render all
> sorts of blocks, do user checks etc etc, only to generate a feed.

User checks should be included though to allow the possibility of
passworded RSS feeds, which some people want, and to not expose items
which are access controlled otherwise.
That's one thing this patch doesn't really deal with.... (It'll have
anonymous access most times... unless you have a cookie or
phpsessionid)

> * For a feed we could decide to do Really Agressive Caching: let only one
> module (be able to) clear the feeds cache. Maybe even time-based. Maybe even
> save a feed as a real file: feed.xml

Caching by just saving 'search as feed' might be a good way to
implement this very cheaply now.... If a previous xml file exists for
'search ABC', and file is older than X minutes, do the search again
and resave it, otherwise skip the expensive SQL search and just return
the file contents.  Popular feeds would be usually be file cached and
incur no SQL lookups more than X minutes apart.  Unpopular feeds would
be a bit slower since the initial file lookup and save would be added
to the already needed SQL search time.

> Because your feature is not only very nice, i beleive it should be in Drupal
> core. Drupal, the community, (partly) grew big trough its feed support, we
> should not leave our support as it is, but continuously develop this. Feeds
> are really hitting big masses lately.

I was surprised nobody had done this patch before.... but then I
thought Drupal's "/feed" for rss was already implemented in lots of
modules (and was surprised how many modules it doesn't work for...) 
Eventfinder (eventfinder/search_events) is another good example that
could use a good RSS feed and doesn't have one... "I want a feed of
events within 50 miles of me"  Unless someone adds a location patch to
SQL search....



More information about the drupal-devel mailing list