[ruby-oci8-devel] Support FAN in Ruby-OCI8

Christopher Jones christopher.jones at oracle.com
Mon May 5 15:54:29 EDT 2008



Shiwei,

Testing FAN will require some infrastructure set up and probably
some manual monitoring under random load.  I'd recommend we publicly
document the steps for anyone who is able to do the set up, but we
(Oracle) need to schedule the tests on our internal RAC systems to
ensure the test is run regularly.

Chris


shiwei zhang wrote:
 > Chris,
 >
 > Regarding the pooling support, it's ok if we skip over the connection
 > pooling and only deliver the session pooling as default for ruby users.
 > Only providing session pooling as default can make the story more easily
 > understandable for ruby users. I will confirm this with you tomorrow or
 > in couple days. I can comment/delete the codes about the connection
 > pooling in the pooling patch.
 >
 > Regarding the FAN support I prefer to set a global variable, thank you
 > and Kubo for the suggestion. I can test the functionality, but it's hard
 > to give out a snippet of test codes specific to the FAN assertion. I
 > haven't seen this kind of test codes in  Php_Oci8 either. Do you think
 > it's necessary to give out the test codes for FAN assertion?
 >
 > Thanks & Best Regards,
 > Shiwei
 >
 > Christopher Jones wrote:
 >>
 >> Setting OCI_EVENT enables ruby-oci8 to receive FAN events.  If
 >> ruby-oci8 uses the OCI session pool, these events will be
 >> automatically handled by the session pool. The DB must be configured
 >> to broadcast FAN events.  The new PHP whitepaper
 >> http://www.oracle.com/technology/tech/php/pdf/php-scalability-ha-twp.pdf
 >> shows the command the DBA would use.  You have already seen the PHP
 >> OCI8 code that sets OCI_EVENTS at
 >> http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?revision=1.269.2.16.2.38.2.15&view=markup
 >>
 >>
 >> I'd recommend (i) making ruby-oci8 (i) making the OCI session pool
 >> default (and not bothering with OCI client connection pool - sorry
 >> Shiwei) (ii) making the event setting optional (as Shiwei indicates),
 >> since setting OCI_EVENT will start a monitoring thread.
 >>
 >> Chris
 >>
 >> KUBO Takehiro wrote:
 >> > Hi,
 >> >
 >> > On Fri, Apr 11, 2008 at 5:28 PM, shiwei zhang
 >> <shiwei.zhang at oracle.com> wrote:
 >> >> Hi, Kubo, ruby-oci8-devel,
 >> >>
 >> >>  I want to implement FAN (Fast Application Notification) functionality
 >> >>  for Ruby-OCI8. Do you have any concerns about this?
 >> >>  When we've supported FAN in  Ruby-OCI8, ruby users can still use
 >> nearly
 >> >>  the same APIs to talk to Oracle DB. They are able to choose FAN
 >> enabled
 >> >>  or disabled when using Ruby-OCI8. For single DB instance it's not
 >> >>  critical to enable FAN, but for multiple DB instances it's much more
 >> >>  beneficial to enable FAN. In PHP, if a user wants to enable FAN he
 >> needs
 >> >>  to setup "oci8.events = On" in the file php.ini. Yet in Ruby-OCI8 we
 >> >>  don't have the configuration file like php.ini, so how should we
 >> provide
 >> >>  an interface for ruby user to feed in his choice? Add a parameter in
 >> >>  OCI8.new()? Add a configuration method for the class OCI8? Do you
 >> have
 >> >>  some suggestions?
 >> >
 >> > What API calls do we need to  implement FAN? As far as I looked at
 >> PHP CVS
 >> > repository, it just need to pass OCI_EVENTS to OCIInitialize()'s first
 >> > parameter.
 >> > Is it correct?
 >> >
 >> > If so, we can not use OCI8.new() to enable FAN, because OCI Environment
 >> > is initialized before OCI8 class is defined.
 >> > Two ideas:
 >> > 1. set a global variable before requiring oci8.
 >> >        $oci8_events = true
 >> >        require 'oci8'
 >> > 2. initialize OCI Environment when it is needed.
 >> >        require 'oci8'  # don't initialize OCI Environment yet.
 >> >        OCI8.events = true
 >> >        conn = OCI8.new(...)   # initialize OCI Environment.
 >> > _______________________________________________
 >> > ruby-oci8-devel mailing list
 >> > ruby-oci8-devel at rubyforge.org
 >> > http://rubyforge.org/mailman/listinfo/ruby-oci8-devel
 >>
 > _______________________________________________
 > ruby-oci8-devel mailing list
 > ruby-oci8-devel at rubyforge.org
 > http://rubyforge.org/mailman/listinfo/ruby-oci8-devel

-- 
Christopher Jones, Oracle
Email: christopher.jones at oracle.com    Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/   Free PHP Book: http://tinyurl.com/f8jad
Follow me: http://friendfeed.com/ghrd


More information about the ruby-oci8-devel mailing list