title: best approach for realtime notifications
body: <p>first of all: this is a <strong>general</strong> question. I don't have any code yet, I just need your (expert) <strong>opinion</strong>.</p>
  
  <p>Ok, here it goes.</p>
  
  <p>I'm creating a website for buying/selling stuff, something like ebay but then not that big (and for a specific type of products). And I need realtime notifications. Untill now, I used PHP/MySQL + jQuery/AJAX. But I want something better.</p>
  
  <p>If someone buys something, the seller needs to get a notification that something is bought. The notification can (a) be "realtime" (if the seller is online) or (b) delayed and shown when the seller comes online.</p>
  
  <p>I'm familiar with PHP and I've "fooled around" with Pusher. Is this the way to go? Or do I need something like (for example) Ratchet? Or is this just the same? And how should I "create" this?</p>
  
  <p>The way I <strong>think</strong> I should do this is the following:</p>
  
  <ol>
  <li>Store every notification in the database</li>
  <li>If the seller (the channel) is online, push the notification through pusher</li>
  <li>If the seller (the channel) is offline, fetch all the unseen notifications when he comes online</li>
  <li>If the notification is seen, update this in the database (or maybe just delete the notification from the database?)</li>
  </ol>
  
  <p>Can someone who has (some) experience with this kind of stuff give me some advice?</p>
  
  <p>Thanks in advance!</p>
  
  <p>PS: sorry for my English (not my native language, I hope you all understand my question)</p>