Jorge Godoy wrote:
> "Ben Sizer" <[EMAIL PROTECTED]> writes:
>
> > So that means that each request is handled sequentially... is that
> > guaranteed by TurboGears?
>
> It isn't guaranteed by TG.  I believe that if I started two transactions on
> the DB, the second one starting before the first expires the visit.  Thinking
> about PostgreSQL that uses MVCC -- so this becomes database dependent -- then
> I'd have two snapshots one with the visit expired and the second with the
> visit still OK.
>
> For this specific second request it'd still be able to retrieve data from the
> database, but a third transaction started right after the expiration has been
> commited by the first transaction wouldn't be able to do it since in this new
> snapshot the visit would have already expired.
>
> Adding to this there's also the isolation level from the database (it is
> possible to serialize all transactions, it is possible to read uncommited
> data, etc. -- it all depends on your database implementation of these
> isolation levels).
>
> I dunno if I was clear here.  If not, ask for more :-)

You were probably clear, but I don't know much about the detail of
database transactions and so on. But even if I drop down to the
database level and make the update directly, can I be sure that the
correct values propagated up to SQLObject in the other threads?

> > Ok... do you know how that ties in with the use of
> > 'sqlobject.util.threadinglocal'?
>
> No.  I haven't used threads with SO.  And I'm holding myself on it, thinking
> about doing new apps with SA...

This all worries me... threads are surely a pretty fundamental part of
many long-running process models, yet nobody except yourself is able to
tell me what is safe and what is not. I at least need to know what sort
of exceptions I need to be able to catch and which circumstances they
may arise in, and which objects in the Turbogears system I can pass
between Python threads and those which I can't.

-- 
Ben Sizer


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to