title: REST: how to tell server to do some background process
body: <p>I am building a client-side product with REST. All user interaction will be done with a browser (the config stuff will be on a server running on localhost). I want everything to be REST compliant, even though the application will be running on a client's machine on <code>localhost</code> and will never be accessible from the outside.</p>
  
  <p>The commands are pretty simple:</p>
  
  <ul>
  <li>update</li>
  <li>restart</li>
  <li>sync</li>
  </ul>
  
  <p>Here's what I've come up with:</p>
  
  <ul>
  <li>POST to / with 'action' parameter (JSON) detailing specifics</li>
  <li>PUT a new resource
  <ul>
  <li>subsequent GET requests will return the status</li>
  <li>when the command is complete, the resource is deleted</li>
  </ul></li>
  </ul>
  
  <p><strong>What would be the most RESTful way to implement this?</strong></p>
  
  <p>Note:</p>
  
  <p>I'm not asking for scrutinization of my software architecture. I have reasons for choosing a REST interface instead of a unix domain socket, CLI interface, or even a regular GUI interface. The justification would overcomplicate the question and make it too localized.</p>
  
  <p>I have had the same need on a couple of different projects (both client only and server) and I am looking for community input on best practices.</p>