1

I have researched enough on such questions, only to get myself confused with which might be the best option to choose. There's this thing called Polling, RTMP, or a workaround with AJAX query to check for messages with newer datestamps, and display them. Which one is the most efficient of these, as to work efficiently with minimal load on the server?

My website is based on PHP with MySQL at back-end.

Andy G
  • 19,232
  • 5
  • 47
  • 69
kamal0808
  • 515
  • 1
  • 8
  • 21

1 Answers1

0

Web sockets tends to be the way to go for chat applications, in your case it sounds like server sent events could be perfect (as from what it sounds you're only receiving events, for two way communication you'll be good using web sockets), both lack support in older browser. So if you need to support older browsers you can go with long polling which out of your choices has the least load on the server as it's one request for every response.

See this post: What are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet? for more info on the specific technologies

Community
  • 1
  • 1
Matthew Mcveigh
  • 5,695
  • 22
  • 22