[storm] Pooling ?
Håvard Gulldahl
havard at lurtgjort.no
Tue Nov 20 17:49:50 GMT 2007
On Tue, 2007-11-20 at 11:51 -0500, Christopher Armstrong wrote:
> Stepping in to give some perspective from a Storm developer who
> doesn't use CherryPy...
>
Fully appreciated, from a developer who has just started getting to
grips with both.
> On Nov 20, 2007 11:35 AM, Håvard Gulldahl <havard at lurtgjort.no> wrote:
> > 1)
> > In the example you're commiting after a store.find() -- is that just for
> > the sake of argument?
> >
> > More generally, why are you store.commit()-ing on every request? Since
> > the store is local to the thread, wouldn't getting stuff from the storm
> > cache (that commit() invalidates) be more convenient?
>
> I'm not really sure I fully understand your question, but in most
> cases committing on every request (generally, aligning the concepts of
> transaction and request so you have one transaction per request) is
> the best way to write a web app.
>
> Perhaps I'm misunderstanding, and you're just suggesting an
> optimization to avoid commiting if no changes have been made? You'd
Yes, I was thinking in the lines of only commiting on changes (to save
an operation), but made a mess of explaining it...
> still need to rollback() to see changes from other transactions
> (assuming you're using SERIALIZABLE transaction mode, which you ought
> to be).
... and I guess I hadn't really thought this through.
> In any case, commiting when there are no changes is very fast.
Great.
>
> > 2)
> > How do you handle disconnects?
>
> Database disconnects are going to be handled gracefully by Storm
> itself in the upcoming release.
This is good news.
Thanks for a prompt and informative reply!
Håvard
More information about the storm
mailing list