If you were to create an application like twitter, how would you go about designing the messaging system?
Specifically look for ideas on the basic data model, and how you would write the method that takes the user's tweet and then sends it out to all its followers?
example:
Tweets ( tweetID, userID, message, datesend)
User (userID, ...)
Followers(userID, followerUserID)
Inbox(userID, tweetID)
is the above model a good starting point?
Would you first insert the tweet, then push a message to the queue. Then one-by-one, take a message off the queue and push the message to its subscribers?
(I am ignoring the mobile functionality of twitter, just focussing on the web based functionality, but I thought of using a queue from the start so one could add other functionality later)