Tag Archives: mysql

Things I did today

Among other things, in the past 24 hours, I've:

  • set up an RDS MySQL instance
  • made an RDS instance a replication slave of our database hosted with Linode
  • fiddled with my bash prompt and other .bash_profile goodies
  • made breakfasts and lunches for my 2 little kids
  • made myself a lovely salad for lunch
  • dropped my kids at school (bigger task than it sounds like)
  • gone to work, where I
    • held scrum
    • reviewed and merged pull requests
    • reviewed and rejected pull requests
    • finished a bug fix
    • reverted a major feature deployment
    • communicated a plan to migrate our database off of Linode and into RDS
    • debugged and tested our database migration plan
  • went to a meetup
  • fixed my home printer not printing
  • plunged a toilet
  • cleaned a toilet
  • written this blog post

Still to do:Update: Also Done

  • review and script our migration plan
  • migrate our database off of Linode and into RDS

Notes On Creating A Multi-user Feed Aggregator

Some time ago, I answered another user's question on Stack Overflow about database design for a multi-user feed aggregator. I also received an email from a developer asking for additional input, which I shared. But I thought I should put my response here, as well, for posterity's sake if nothing else. Note that my comments here assume MySQL as the database but should apply to any SQL database.

Basically, my emailer asked what to do about the fact that the posts table will get huge very quickly if we have multiple users and a row for each post for each user. It's actually a pretty basic relational database scenario, but if you start your project as a single user application and later decide it's going to be multi-user, you may not realize that you probably need to completely redesign your database.

So I've posted the schemae I use for my multi-user feed aggregator (a private project):

I've also posted a sql command that you can run in a cron job to remove read posts that are more than 14 days old:

As an aside, I'm amazed by how many people are writing new aggregators. Is it a common programming class exercise to write a feed aggregator or something?