Professional Web Applications Themes

:Oracle9 and non-blocking mode - Ruby

> -----Original Message----- > From: Jim Cain [mailto:listjimcain.us] > Sent: Tuesday, July 01, 2003 10:04 AM > To: [email]ruby-talkruby-lang.org[/email] > Subject: DBD::Oracle9 and non-blocking mode > > > I'm about ready to make available an early copy of my > library, but first > I have some questions regarding non-blocking mode. I've never > actually > used this feature, so I'd like to hear from those that do how > they use > it. Do you need more support for it beyond simply > setting/resetting the > mode? What is the most convenient way for you to be notified > ...

  1. #1

    Default Re: :Oracle9 and non-blocking mode


    > -----Original Message-----
    > From: Jim Cain [mailto:listjimcain.us]
    > Sent: Tuesday, July 01, 2003 10:04 AM
    > To: [email]ruby-talkruby-lang.org[/email]
    > Subject: DBD::Oracle9 and non-blocking mode
    >
    >
    > I'm about ready to make available an early copy of my
    > library, but first
    > I have some questions regarding non-blocking mode. I've never
    > actually
    > used this feature, so I'd like to hear from those that do how
    > they use
    > it. Do you need more support for it beyond simply
    > setting/resetting the
    > mode? What is the most convenient way for you to be notified
    > that an OCI
    > call is still executing? When a call is still running, would
    > you like to
    > call Statement#execute again to see if it's finished, or
    > would you like
    > some other method?
    >
    > Thanks for the input.
    >
    > Cheers,
    > Jim
    Hi Jim,

    I use it to timeout connect calls when a database is either down and/or
    unreachable for some reason. This is rare, but it does happen, either
    because of a network glitch or a snapshot is going on, or it's just down.
    Here's a code snippet.

    require "dbi"
    require "timeout"

    begin
    timeout(10){
    DBI.connect("dbi:oracle:mydsn",user,passwd)
    }
    rescue TimeoutError
    # perhaps sleep & retry, perhaps exit
    rescue
    # some other error
    end

    As things stand now the timeout block does nothing and it takes 1-2 minutes
    (!) for the connect attempt to timeout if something goes wrong.

    I also refer you to my original post about this problem at
    [url]http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/68854[/url]

    Regards,

    Dan

    Berger, Daniel Guest

  2. #2

    Default Re: :Oracle9 and non-blocking mode

    Out of curiosity, will binaries (for Win32, specifically), be distributed?
    > -----Original Message-----
    > From: Jim Cain [mailto:listjimcain.us]
    > Sent: Tuesday, July 01, 2003 11:04 AM
    > To: ruby-talk ML
    > Subject: DBD::Oracle9 and non-blocking mode
    >
    >
    > I'm about ready to make available an early copy of my library, but first
    > I have some questions regarding non-blocking mode. I've never actually
    > used this feature, so I'd like to hear from those that do how they use
    > it. Do you need more support for it beyond simply setting/resetting the
    > mode? What is the most convenient way for you to be notified that an OCI
    > call is still executing? When a call is still running, would you like to
    > call Statement#execute again to see if it's finished, or would you like
    > some other method?
    >
    > Thanks for the input.
    >
    > Cheers,
    > Jim
    >
    >
    Michael Campbell Guest

  3. #3

    Default Re: :Oracle9 and non-blocking mode

    Michael Campbell wrote:
    > Out of curiosity, will binaries (for Win32, specifically), be distributed?
    >
    >
    >>-----Original Message-----
    >>From: Jim Cain [mailto:listjimcain.us]
    >>Sent: Tuesday, July 01, 2003 11:04 AM
    >>To: ruby-talk ML
    >>Subject: DBD::Oracle9 and non-blocking mode
    >>
    >>
    >>I'm about ready to make available an early copy of my library, but first
    >>I have some questions regarding non-blocking mode. I've never actually
    >>used this feature, so I'd like to hear from those that do how they use
    >>it. Do you need more support for it beyond simply setting/resetting the
    >>mode? What is the most convenient way for you to be notified that an OCI
    >>call is still executing? When a call is still running, would you like to
    >>call Statement#execute again to see if it's finished, or would you like
    >>some other method?
    >>
    >>Thanks for the input.
    >>
    >>Cheers,
    >>Jim
    >>
    No, I won't be making Win32 binaries myself. I've never developed native
    Win32 apps, and I don't have a Win32 development environment. All my
    coding is on Linux.


    Jim Cain Guest

  4. #4

    Default Re: :Oracle9 and non-blocking mode


    "Jim Cain" <listjimcain.us> wrote in message
    > Michael Campbell wrote:
    > > Out of curiosity, will binaries (for Win32, specifically), be
    distributed?

    [snip]
    > No, I won't be making Win32 binaries myself. I've never developed native
    > Win32 apps, and I don't have a Win32 development environment. All my
    > coding is on Linux.
    I will volunteer to generate Win32 binaries (using VC++ 6.0) ... if that is
    OK by y'all !


    Shashank Date Guest

Similar Threads

  1. #20745 [Com]: socket_accept() in blocking mode doesn't handle signal interrupts
    By antoine dot bajolet at tdf dot fr in forum PHP Bugs
    Replies: 0
    Last Post: March 12th, 06:54 PM
  2. Replies: 0
    Last Post: August 29th, 12:18 PM
  3. #25309 [NEW]: stream_set_blocking() doesn't set non-blocking mode
    By flugelaar at pandora dot be in forum PHP Development
    Replies: 0
    Last Post: August 29th, 11:37 AM
  4. Will Thread blocking in read() leads to process blocking?
    By Loic Domaigne in forum UNIX Programming
    Replies: 4
    Last Post: July 23rd, 12:36 PM
  5. DBD::Oracle9 and non-blocking mode
    By Jim Cain in forum Ruby
    Replies: 5
    Last Post: July 3rd, 10:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139