In a fairly standard blog/articles/comments type setup, what is the most elegant way of offering content tailored to users’ interests (as determined by previous activity)?
A tag system for articles exists, so really all that is required is to track the tags of articles that each user reads or comments on. This would be very straightforward by simply writing this information to users’ sessions, but what’s the best way of modeling it in the site database so that recommendations are session-independent? If a user reads 4 articles tagged as one thing and 2 tagged as another, the system would ideally suggest more articles matching the first tag than the second the next time the user looks at the main page.
What kind of data model can best accomplish this? Having a whole ton of extra fields in the user table seems extremely cumbersome.
Something like that. One row per tag for each user. Add to weight when a user reads/comments on something with that tag.