[ruby-oci8-devel] propose to implement pooling technology for Ruby-OCI8
shiwei.zhang at oracle.com
Mon Jan 21 05:58:37 EST 2008
KUBO Takehiro wrote:
> 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.
Many thanks to your explanation. Yet if it's Ruby1.9, which has brought
Native Threads into Ruby, do you also think it's necessary to execute
time-consuming operation in rb_thread_blocking_region()? Probably yes I
think, because Ruby (even Ruby1.9) interpreter is using GIL (Global
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ruby-oci8-devel