For a site I'm planning, I need the server to be able to send commands to a logged-in user's browser.
Simplic example: When a call center rep gets a call, I want to automatically pull up the lead who is calling in.
I've got the rest of the technology sorted out and I need to get a sketch together of how the actual communication to the browser will work.
From my research so far, this is often done with desktop software or plugins, but that feels pretty old school at this point. I know it can be done with javascript, either by writing something that constantly polls the server for commands (this could work, but it feels a little wasteful and brute force-y) or by some other technique that gives the server a way to call out to the client.
Something like whatever mechanism stackoverflow uses to tell you new answers have arrived on the current question would probably do the trick.
So is there a known best practice? What worked for you?