> One thing the article made clear was that the design of having a users > table makes sense in a *lot* of situations, just not all. The soution > they outline is very specific to twitter. > > Alto bear this in mind, their system breaks down a little when you > decide to follow another user, you then have to find all (all of the > historical, just the last day? just the last 100? what?) their posts, > and insert them into your private post stream, which could get quite > intensive. Granted it doesn't happen as often as searching, or posting, > but it could have a big impact.
My thought would be that you'd just be following then from that point forward (so no need for past data). However, that user's past data could still be availabe on their profile if you cared to look through it, but you'd only be subscribing to their new posts. > To answer your question though. You would probably have a users table, > and that would have a one to many relation to entries in a > <username>_stream table. The logic that creates the user in the database > would first create the <username>_stream table, and then create the > actual user. You would need a fair bit of reflection on the ruby side to > get that to work, as their wouldn't be anything in the DB to directly > connect the two tables. This is what I was afraid of. > Which sounds a bit fishy to me. Although I guess you could have > <user.id>_stream as the table name, which is a little less ambiguous. Yeah that doesn't seem so bad. So instead of having to query a giant table of everyone's posts, you'd only be querying the <user.id>_stream tables of all the users you're following. This makes sense in my hypothetical mind, but the way to implement it I wasn't sure. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---