[Zope-dev] Re: straighting out the SQLAlchemy integration mess

Martin Aspeli optilude at gmx.net
Wed Apr 9 03:32:20 EDT 2008


Martijn Faassen wrote:
> Hi there,
> 
> [I originally picked this up on a thread on zope3-users, but this 
> deserves its own thread here]
> 
> There are at least three approaches to SQLAlchemy integration with Zope:
> 
> * z3c.zalchemy (Christian Theune)
> 
> * z3c.sqlalchemy (Andreas Jung)
> 
> * collective.lead (Laurence Rowe)
> 
> All of these are in various states of brokenness. z3c.zalchemy doesn't 
> work with SQLAlchemy trunk. collective.lead works with it, but only if 
> you check out a particular branch, and not with sqlite. Quite possibly 
> z3c.sqlalchemy has a release that actually works. One out of three is 
> not bad... :)
> 
> Then there's also mentions about WSGI-based integration, and I think in 
> Plone, Alchemist probably also does its own integration...
> 
> There must be a reason for this proliferation of approaches. What is it? 
>   We all get along, don't we? I know that the various packages are 
> taking code and approaches from each other too.
> 
> Can't we work together more and at least come up with *one* package that 
> works? Perhaps factor out some low-level commonality than then all 
> share? Criticize one of the other packages until you're satisfied, and 
> then retire your own package perhaps? I know the various packages add on 
> their own approaches to configuration and might offer higher level 
> container approaches. Those could be in different packages, sharing a 
> foundation.
> 
> In the end, I hope we will end up with just *one* integration layer, 
> that is released, that works with Zope 2 and Zope 3 and a recent release 
> of SQLAlchemy, that is documented, and that people know about. We can 
> then offer packages on top of this that offer extra features.

I'm all for one integration layer, even though I spurred one of the 
above (collective.lead). I would ask that we be very conservative, 
though. collective.lead wants to provide:

  - automatic transaction integration with ZODB transactions
  - an easy way to register your database connections
  - an easy way to look those up as utilities and get an ORM session

Everything else (e.g. Zope ORM integration, configuration abstractions, 
etc) should be in some other package.

collective.lead has a reasonable degree of traction in the Plone 
universe, at least, but should work just fine with plain Zope 3. We have 
other things that work on top it (mercury, rope, probably others).

The branch that works with trunk also has some carefully worked out TPC 
support, which is difficult to get right, though I'm disappointed that 
we seem to have broken sqlite integration. Hopefully it's an easy fix, 
though.

I'm CC'ing Laurence to ask:

  - can we get a release soon?
  - can we fix the sqlite integration?

Cheers,
Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Zope-Dev mailing list