Active Resource

35 views
Skip to first unread message

Hugh Evans

unread,
Nov 3, 2009, 10:30:38 PM11/3/09
to Typhoeus
Has anyone successfully integrated Typhoeus with ActiveResource? I had
a quick play at using it for single get requests:

http://gist.github.com/225747

But it is the parallel requests that I really need.

Cheers,
Hugh

John Wulff

unread,
Nov 27, 2009, 6:18:20 PM11/27/09
to Typhoeus
Ever get anywhere on this? I'd really like to see it work. Perhaps
extracting Typhoeus' parallelization style into a separate library is
a good path.

Something that looks like this:

class AccountsController < ApplicationController
def show
hydra = Typhoeus::Hydra.new
hydra.queue { @account = Account.find 123 } # Account <
ActiveResource::Base
hydra.queue { @contact = Contact.find 123 } # Contact <
ActiveResource::Base
hydra.run
end
end
Reply all
Reply to author
Forward
0 new messages