Simple DB Access
Serge Aleynikov
serge@REDACTED
Sat Aug 5 01:47:52 CEST 2006
Ryan Rawson wrote:
> OCI is very mature and would probably work ok as a linked in driver.
> Our in-house API just makes OCI calls so you dont have to - OCI is
> very... baroque to say the least. You don't want to deal with that
> stuff just to do the basics. No wire-format necessary - you don't
> want to go down that path, you're asking for a world of hurt. For
> example, most libraries which implement the oracle 'wire protocol'
> can't handle things like RAC.
I am not sure I'd agree if a linked-in driver option is an overall good
choice for the OCI. Things like running a query that doesn't come back
due to a change in the query optimization plan on the server, server
utilization, etc. are not atypical for Oracle. How cleanly then can you
abort that session without causing some sort of memory/resource leak? I
don't think OCI offers a good way of dealing with these issues (other
than killing a hung thread/process). Yes there was a function added in
9i that attempted to cancel a running query, but it never guaranteed how
long it would take (since Oracle would need to perform a rollback), and
it was not uncommon to see such canceled queries completely freeze the
control for an hour.
On the other hand, depending on how critical it is for your service to
be up all the time, I admit that the performance win of using link-in
drivers for some systems may out-weight the stability factor. Perhaps a
choice of link-in driver or port with analogous interface would be the best.
Serge
More information about the erlang-questions
mailing list