title: How to create a full-duplex communication between an API and a Rails app?
body: <p>I have a video transcoding API and a CMS application which consumes it.</p>
  <p>Workflow is as follows:</p>
  <ul>
  <li>CMS sends a <code>GET</code> request to to the API to get a of list video files to transcode and it gets the answer in JSON format.</li>
  <li>CMS user selects which file to be transcoded and clicks on the &quot;Transcode&quot; button.</li>
  <li>As user click on the link, a <code>POST</code> request goes to API and API creates necessary <code>Progress</code>es internally and responds with initial status of the progresses in JSON format.</li>
  <li>After creating <code>Progress</code>es at the API, I make <code>GET</code> ajax requests to API asking about the current process status periodically. Because it's a requirement for me to show user current status of the transcoding processes (like percentage..).</li>
  <li>Additionally, I have some other resources that I should inform CMS about the current status.</li>
  </ul>
  <p>At this time, I'm making an ajax call to API once in 5 seconds.</p>
  <h2>Here is the question:</h2>
  <p>Is this the best way to do it all?</p>
  <p>Is there a way to create full-duplex communication between an API and a Rails app?</p>
  <p>I tried <code>pusher</code> and push notifications but seems like they're only for front-end communication? Is this true?</p>
  <p>I had heard about <code>websocket</code> but I couldn't find a good resource to fully understand it.</p>
  <p>What is the approved way of Rails community to do what I ask for?</p>
  <p>Thank you</p>