Search code examples
apirestruby-on-rails-4batch-processingbulk

How to integrate batch requests in a Rails API?


I'm building an API with Rails 4 and I really want to create a Batch request method to not overload my app when doing a bunch of ajax requests.

The Railscasts shows how to do it in a simple way but there's a lot of stuff missing.

I also tried the batch_api gem but I wasn't successful integrating it with my application.

Any ideas?


Solution

  • Apparently the batch_api gem doesn't work with rails 4 yet, but there is a fork that was started to update it to rails 4 and ruby 2.0.

    https://github.com/easyPEP/batch_api/tree/feature_ruby_2