title: Is it ok to use HTTP REST API for Chat application?
body: <p>We are building a chat application on Android. We are thinking of using HTTP REST API to send outbound messages. Wanted to know if it's a good approach or has any downsides compared to using WebSockets or XMPP (which seems to be more of a defacto standard for transferring chat messages)?</p>
  <p>Some of the pros/cons I can think of are:</p>
  <ul>
  <li>HTTP endpoint is easy to scale horizontally on the server side (This is the main concern)</li>
  <li>Learning curve for Websockets is steeper compared to HTTP</li>
  </ul>
  <ul>
  <li>HTTP messages would have a larger payload compared to WebSockets</li>
  </ul>
  <p>As per this document, it seems even Facebook used AJAX to handle chat messages initially:</p>
  <p><a href="https://www.erlang-factory.com/upload/presentations/31/EugeneLetuchy-ErlangatFacebook.pdf" rel="noreferrer">https://www.erlang-factory.com/upload/presentations/31/EugeneLetuchy-ErlangatFacebook.pdf</a></p>