[ruby-oci8-devel] propose to implement pooling technology for Ruby-OCI8

KUBO Takehiro kubo at jiubao.org
Fri Jan 18 04:51:11 EST 2008


On Jan 18, 2008 5:32 PM, shiwei zhang <shiwei.zhang at oracle.com> wrote:
>  Kubo, thanks, I know the apiwrap.c is created from apiwrap.yml and
> apiwrap.c.tmpl by apiwrap.rb. But I want to ask: What's the difference
> between the Remote API and  the Local API? Why do you group the APIs into
> remote and local? This isn't a question influencing my work much, yet  i'd
> like to know about your angle or ideas on this. :-)

Ruby 1.8's thread model is green. Its threads are managed by ruby itself
without help of native thread API. If a ruby's method call is blocked in a C
extension library, all other threads are also blocked.
I added non-blocking mode to ruby-oci8 to prevent a long-time SQL execution
from blocking ruby's other threads. To implement it, I needed to group
OCI APIs into ones which might block and ones which might not.
The former is remote and the latter is local because I thought if a OCI
function call needed network round trips, it might be blocked.

More information about the ruby-oci8-devel mailing list