davidrac
davidrac

Reputation: 10738

Executing several web service calls in parallel in rails

My rails application uses Koala to connect to Facebook.

I'm using batch calls to speed things up, and I'd like to make several calls in parallel in order to make it even faster.

What is the right way to make several calls in parallel in rails?

Upvotes: 1

Views: 558

Answers (1)

phoet
phoet

Reputation: 18845

using threads within rails is fine. you need to make sure that the libs you are using are thread-safe!

if you don't need live data i would rather use a queue like resque or sidekick instead. if you want to do a lot of threading, than you might be better of with something like celluloid: https://github.com/celluloid/celluloid/wiki/Basic-usage

Upvotes: 4

Related Questions