# ? regarding Executing/Spawning Ruby calls in parallel

**URL:** <https://www.ruby-forum.com/t/regarding-executing-spawning-ruby-calls-in-parallel/126415>\
**Category:** Ruby\
**Created:** [January 18, 2008, 3:39am UTC](https://www.ruby-forum.com/t/regarding-executing-spawning-ruby-calls-in-parallel/126415 "2008-01-18T03:39:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/edb3f5/32.png) [@Venks](https://www.ruby-forum.com/u/Venks)\
**Post date:** [January 18, 2008, 3:39am UTC](https://www.ruby-forum.com/t/regarding-executing-spawning-ruby-calls-in-parallel/126415/1 "2008-01-18T03:39:33Z")

</div>

Hi,

I have “X” number of databases running and I need to send a query  
request to the “X” number of servers and I want to do this in  
asynchronous fashion. Meaning I want to fire off the query to each  
server without any inter-dependencies.

Of course, I need to wait until all the requests to each server is  
completed but the idea here is to fire-off the queries to each server  
and not worry about any sharing. I tried Ruby threads but it doesn’t  
perform well and I think it’s because of green threads.

Any ideas on how I can implement this requirement? I am not too  
familiar with fork or pipes but just wondering if there are any such  
techniques that I can use to accomplish this.

Thanks,

-Venks
