title: How to perform parallel processing on a "single" rails API in server side?
body: <p>There are a lot of methods to handle "multiple" API requests in server side. Parallel processing can be implemented here.
  But i would like to know how a single API can be parallely processed.
  For example:
  If an API request executes a method say method1.</p>
  
  <pre><code>    def method 1  
        .....
        ......
        .......
      end
  </code></pre>
  
  <p>If method1 is a long method which may take a long time for processing (include multiple loops and database queries), instead of processing it sequentially, is there a scope for parallel processing there?</p>
  
  <p>One way would be using resque for creating background jobs. But is there any other way to do it and if so how should the code be written to accommodate the requirement.</p>
  
  <p>And is there any server side method to do it which is not ruby specific?</p>