I am not very educated on this topic of programming so I am seeking any advice/knowledge. I am coding a web app in PHP, and this particular task requires updating the display after the server has new information available. So, one seemingly-bad solution is to have a repeating AJAX request that spams the server on an interval, and updates when it gets new data. This puts a lot of stress on the server, so it seems unviable to me.
We attempted to use Ratchet (http://socketo.me/) but could not really figure it out. Is this overcomplicating this, or is there another way we can solve this problem while still keeping server load as "practically" minimal as possible. There are websites like Facebook/most social media that dynamically show new data as it's available -- I assume they also use something that minimizes requests to the server? Or is this assumption incorrect?