[storm] Questions about DeferredStores on twisted-storm branch

Oscar Campos oscar.campos at open-phoenix.com
Wed May 12 04:31:28 BST 2010


Thanks for the advice, I think you're right.
I'll move the stores from model to controller and associate it with requests
instead of models.

Best Regards.

2010/5/12 James Henstridge <james at jamesh.id.au>

> On Tue, May 11, 2010 at 9:48 PM, Oscar Campos
> <oscar.campos at open-phoenix.com> wrote:
> > Yeah, that makes sense to me, so I already implemented it on this way.
> >
> > In my application I have twisted web resources loaded as "controllers",
> each
> > resource can have a model object (storm object) attached on it that
> > represents a database table, each model object owns a DeferredStore (or a
> > Store) that depends on application configuration.
>
> Hmm.  That doesn't sound like the best way to structure things.
>
> Usually I'd associate the store with the current request (the
> twisted-integration branch provides a store pool implementation which
> you could use this for).  You'd then use that store for all the
> database access done by the request.  Having a single request make
> changes to a database via multiple connections simultaneously almost
> always ends in tears :)
>
> James.
>



-- 
Oscar Campos Ruiz-Adame -oscar.campos at open-phoenix.com
Consultor - Consultant
Open Phoenix IT Consultoría Tecnológica - IT Consulting
_________________________________________________
Tel. +34 644569088
http://www.open-phoenix.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20100512/277178fd/attachment.htm 


More information about the storm mailing list