title: user notification system design
body: <p>I'm trying to make a user notification system(like facebook)
  I have mysql tables which simplified like  ;</p>
  
  <pre><code>user : id,username
  post : id,user_id,text
  comment:id,user_id,post_id,text
  post_like:id,post_id,user_id
  friend:id,owner_id,follower_id
  </code></pre>
  
  <p>You can see the relations between tables.. This notification system should allow to user track comments under a post which owner of a post or touched to the post(like or comment),
  track like action on a post which owner of a post or touched to the post(like or comment),
  notify friendship actions and similars.</p>
  
  <p>First I think to solve it with another tables ;</p>
  
  <pre><code>notification: id,notification_type,user_owner,user_other,isNotified,date
  ntype:id,type (such as friendship,add a comment, like a post etc.)
  </code></pre>
  
  <p>So when a user make an action I'll just insert the action on notification table then on client I'll check with ajax the logged user has any notification(with isNotified=false)
  after that just update isNotified=true.</p>
  
  <p>In this scenario how can i notify other users which touch a post (commented or liked).. It's just notifiying to owner of post in this case..</p>
  
  <p>Also while i'm researching find <a href="https://stackoverflow.com/questions/1315991/design-pattern-notification-system">the notification queque</a>, I think it's better way to implement something like that.. So can you give some details about how to imlement a notification queque..</p>
  
  <p>I'm also curious about performance issues about it.. Let say what happens if have 100K user and each user has 10 post and 100 comments,likes daily. Then what will happen?
  Should i consider some nosql solutions for this job such as neo4G or mongodb?
  Thank you..</p>