# Process-per-connection with drb

**URL:** <https://www.ruby-forum.com/t/process-per-connection-with-drb/102669>\
**Category:** Ruby\
**Created:** [January 31, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/process-per-connection-with-drb/102669 "2007-01-31T17:06:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [January 31, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/process-per-connection-with-drb/102669/1 "2007-01-31T17:06:35Z")

</div>

Reading through drb.rb, I see that drb uses a thread-per-connection  
model. I have some C++ extensions that I want to provide access to via  
a drb server. Unfortunately, these extensions are not safe to use with  
ruby’s green threads, and it is impossible to make them thread-safe,  
given the mechanism ruby uses to switch thread contexts.

I want to instead use a process-per-connection model and have a pool of  
processes waiting to handle requests. How should I go about  
implementing this?

Paul
