Instant notifications like Facebook
<p>I am building a social application and was wondering how facebook achieve their notifications.
As you know, facebooks notifications are instant. As soon as someone takes an action, people are notified. </p>

<p>I assume they don't have a query running on the database all the time.</p>

<p>Can someone point me in the right direction. Thanks</p>
