The Artima Developer Community
Sponsored Link

Python Buzz Forum
Database adapter trouble in Zopeland

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Carlos de la Guardia

Posts: 219
Nickname: cguardia
Registered: Jan, 2006

Carlos de la Guardia is an independent web developer in Mexico
Database adapter trouble in Zopeland Posted: Feb 1, 2012 1:51 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Carlos de la Guardia.
Original Post: Database adapter trouble in Zopeland
Feed Title: I blog therefore I am
Feed URL: http://blog.delaguardia.com.mx/feed.atom
Feed Description: A space to put my thoughts into writing.
Latest Python Buzz Posts
Latest Python Buzz Posts by Carlos de la Guardia
Latest Posts From I blog therefore I am

Advertisement
My company recently worked out an agreement with Oracle to port some of our products to the Oracle Database and I was assigned to the project. After examining the involved applications, I was happy to find out that the changes to the SQL used in them were few and prepared myself to do the work and finish it as soon as possible.

It turns out that the work was harder than expected, not because of the code, but because of the lack of a decent adapter for the Oracle Database. We need to use Oracle 10g for this project and DCOracle2, the only Zope DA that can work with a version of oracle higher than 7, is not being developed at the moment and the last update came in 2003. That means it doesn't work with versions of Oracle greater than 8. Well, according to what some people say on the mailing lists it can be made to work, but you have to tinker with the make file.

I am not sure I want to invest a lot of time fighting with the DCOracle2 setup, specially since opinions at the Zope DB mailing list lead me to believe that it is somewhat buggy and has trouble supporting some features. There is another adapter for Python, cx_oracle, and this one works with Oracle 10, but there is no DB adapter for Zope. I decided I would at least find out how hard it would be to write a Zope DA for cx_oracle, but it turns out that there is almost no information on that subject. If you search the zope.org site you get no results for this (which is kind of odd because the one article that I finally found was there), but if you are patient and dig into the mailing lists you can find an introduction to writing a DA, authored (I think) by Chris Petrilli. These seems to be the only information available on the subject.

I decided writing my own DA would not be a good idea for this project, given my time constraints, so my other option is to use an ODBC adapter instead. There is a ZODBC adapter available from Zope, but it is Windows only and also unmaintained. The only other option is mxODBC Zope DA, a commercial adapter by Egenix. It seems to be a good solution to the problem, but it requires an existing ODBC driver. That's certainly no problem in Windows, but for Linux you probably need another commercial product, so the cost is not small.

Anyway, we'll have to make a decision this week, so maybe we'll have to go the commercial route. I just thought by now Zope would have better solutions for this problem, so I am a bit disappointed. Part of the problem is the fact that even if there is an adequate open source solution for Python (which is the case here with Oracle but not with ODBC), there still needs to be a separate solution written for Zope's DA interface. Of course if we use a DA we get automatic transaction support and more from Zope's machinery, so I can't really complain, since I could theoretically modify my software to work directly from Python without using Zope's DAs (but if that's worth it, why use Zope at all?). Also, given that Zope Corporation is a consulting company, they have a lot of pressure to make their developers work on tools that their clients require, not on community member wishes, so I totally understand their decision to stop supporting DA's.

Read: Database adapter trouble in Zopeland

Topic: Compiling DCOracle2 for Oracle 10g Previous Topic   Next Topic Topic: A little hype never hurt anybody

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use