Does em-synchrony support asynchronous call on oracle database?


I want to make two asynchronous calls on a Ruby on Rails server. One HTTP request and one database query. After both calls are finished then I will merge them to become one single JSON object.

After spending many hours on the internet, the closest thing I could find is em-synchrony. Just like EventMachine and Fiber, no oracle database support is mentioned anywhere.

Is it doable?

If that’s not the right approach, how could it be done? Should I create a new Thread for one of the request then join them?

require ‘eventmachine’

require ‘em-synchrony’

require ‘em-synchrony/em-http’

EM.synchrony do

multi =

multi.add :page1,“”).aget

multi.add :page2, { return “5” }

data = multi.perform.responses[:callback].values, 2).each do |page, iter|


puts “All done! Stopping event loop.”