[openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-08 Thread Mike Bayer
Hi all - I’ve drafted up my next brilliant idea for how to get Openstack projects to use SQLAlchemy more effectively. The proposal here establishes significant detail on what’s wrong with the current state of things, e.g. the way I see EngineFacade, get_session() and get_engine() being used,

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-09 Thread Roman Podoliaka
Hi Mike, Great stuff! Fixing the mess with transactions and their scope is probably one of the most important tasks for us, IMO. I look forward for this to be implemented in oslo.db and consuming projects! Thanks, Roman On Thu, Oct 9, 2014 at 12:07 AM, Mike Bayer wrote: > Hi all - > > I’ve draf

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-09 Thread Mike Bayer
So so far, everyone seems really positive and psyched about the proposal. It looks like providing some options for how to use would be best, that is provide decorators and context managers. Now the thing with the context manager, it can be as I stated: with sql.reader() as session: or

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Ihar Hrachyshka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 09/10/14 21:29, Mike Bayer wrote: > So so far, everyone seems really positive and psyched about the > proposal. > > It looks like providing some options for how to use would be best, > that is provide decorators and context managers. > > Now the

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Mike Bayer
On Oct 10, 2014, at 6:13 AM, Ihar Hrachyshka wrote: > Signed PGP part > On 09/10/14 21:29, Mike Bayer wrote: > > So so far, everyone seems really positive and psyched about the > > proposal. > > > > It looks like providing some options for how to use would be best, > > that is provide decorators

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Mike Bayer
On Oct 10, 2014, at 11:41 AM, Mike Bayer wrote: > I’ve been asking a lot about “hey are people cool with thread locals?” and > have been waiting for what the concerns are. > > Since I wrote that email I’ve shifted, and I’ve been considering only: > > @sql.reader > def my_api_method(contex

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Joshua Harlow
On Oct 10, 2014, at 3:13 AM, Ihar Hrachyshka wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 09/10/14 21:29, Mike Bayer wrote: >> So so far, everyone seems really positive and psyched about the >> proposal. >> >> It looks like providing some options for how to use would be bes

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Ihar Hrachyshka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 10/10/14 20:21, Joshua Harlow wrote: > On Oct 10, 2014, at 3:13 AM, Ihar Hrachyshka > wrote: > > On 09/10/14 21:29, Mike Bayer wrote: So so far, everyone seems really positive and psyched about the proposal. It looks like pr

Re: [openstack-dev] [all] [oslo] Proposed database connectivity patterns

2014-10-10 Thread Joshua Harlow
On Oct 10, 2014, at 12:52 PM, Ihar Hrachyshka wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 10/10/14 20:21, Joshua Harlow wrote: >> On Oct 10, 2014, at 3:13 AM, Ihar Hrachyshka >> wrote: >> >> On 09/10/14 21:29, Mike Bayer wrote: > So so far, everyone seems really posit