RE: Databases: Which one's right for me?

Discussion in 'Python' started by Tim Peters, Jan 12, 2004.

  1. Tim Peters

    Tim Peters Guest

    [Aaron Watters]
    > Some SQL isolation levels are hacks to allow long running
    > transactions, etcetera. If you keep to the strictest isolation level
    > you get the classical behaviour which has been studied and elaborated
    > by many very smart people over the last several decades and which is
    > very well understood.
    >
    > Does ZODB support the strictest isolation levels?


    I'm almost certain it doesn't, but I'm not a DB expert. Please take this to
    a ZODB list, as previously suggested.

    > If so how? If not what does it support exactly?


    I pointed you to Jeremy's relevant blog entry last time, which discusses
    these issues -- and nobody knows more about ZODB than Jeremy. If you want
    someone to read it for you and reword it, I'm sure someone on a ZODB list
    will be happy to do so <wink>.
     
    Tim Peters, Jan 12, 2004
    #1
    1. Advertising

  2. "Tim Peters" <> wrote in message news:<>...
    > [Aaron Watters]
    > > Does zodb support the strictest isolation levels?

    >
    > I'm almost certain it doesn't, but I'm not a DB expert. Please take this to
    > a ZODB list, as previously suggested.
    >
    > > If so how? If not what does it support exactly?

    >
    > I pointed you to Jeremy's relevant blog entry last time...


    Reading the blog it seems you are right. I wish zodb would be
    a bit more careful in its claims. When you say "zodb supports
    the ACID properties of transactions" this has a precise meaning
    which vanishes when you redefine all the letters. In particular
    it suggests that zodb would be good for something like an
    accounting or banking application which would require strict
    transaction isolation (serializability). The looser definition
    could lead to fairly unpleasant difficulties (law suits, jail time...).
    Sorry, had to complete my thought on clp.

    -- Aaron Watters
    ===
    so you better start swimming or you'll sink like a stone
    for the times, they are a-changing. --Dylan
     
    Aaron Watters, Jan 12, 2004
    #2
    1. Advertising

  3. On Mon, 2004-01-12 at 09:58, Aaron Watters wrote:
    > "Tim Peters" <> wrote in message news:<>...
    > > [Aaron Watters]
    > > > Does zodb support the strictest isolation levels?

    > >
    > > I'm almost certain it doesn't, but I'm not a DB expert. Please take this to
    > > a ZODB list, as previously suggested.
    > >
    > > > If so how? If not what does it support exactly?

    > >
    > > I pointed you to Jeremy's relevant blog entry last time...

    >
    > Reading the blog it seems you are right. I wish zodb would be
    > a bit more careful in its claims. When you say "zodb supports
    > the ACID properties of transactions" this has a precise meaning
    > which vanishes when you redefine all the letters.


    Perhaps you could say something about which of the letters you think
    we've redefined in a confusing way. If you're talking about my blog
    entry or the zodb programming guide, I wrote the definitions and the
    text is simply my gloss on the what I thought the standard definitions
    were.

    Here's a definition of isolated from Gray & Reuter: "The property that
    two transactions running in parallel have the illusion that there is no
    concurrency. It appears that the system runs one transaction at a
    time. So a transaction is isolated from the uncommitted updates of
    others (so-called dirty data), and the transaction has repeatable
    reads. (See also degree 1 isolation, degree 2 isolation, degree 3
    isolation.)"

    In the programming guide, we say "Isolation means that two programs or
    threads running in two different transactions cannot see each other's
    changes until they commit their transactions." That strikes me as
    pretty consistent with the Gray & Reuter definition.

    In my blog entry (http://www.python.org/~jeremy/weblog/030514.html), I
    get into the finer details using some terminology from Atul Adya's PhD
    thesis. The ANSI standard isolation levels don't work for optimistic
    concurrency control, and Adya fleshes out some levels that makes sense
    for optimism and looking.

    > In particular
    > it suggests that zodb would be good for something like an
    > accounting or banking application which would require strict
    > transaction isolation (serializability). The looser definition
    > could lead to fairly unpleasant difficulties (law suits, jail time...).
    > Sorry, had to complete my thought on clp.


    Shane Hathaway posted a nice message about the isolation level supported
    by zodb last spring.
    http://mail.zope.org/pipermail/zodb-dev/2003-March/004684.html

    ZODB does not support full serializability at the moment. The current
    stable release supports cursor stability and the new development release
    of ZODB 3.3 + multi-version concurrency control will support snapshot
    isolation. The remaining obstacle to full serializability is write
    skew. I think we can address that problem, but it hasn't been a high
    priority for ZC.

    Jeremy
     
    Jeremy Hylton, Jan 12, 2004
    #3
  4. re: jeremy's reply...

    I find the Gray and Reuter definition confusing. To my mind isolation means
    serializability and if you don't have serializability (at least as an
    option)
    you don't have isolation. Transactions don't have to be complex to
    cause serious
    problems in read-committed mode: the classic example is a debit of
    $1000 for
    checking account 123 running at the same time as a credit for $4000 for
    checking
    account 123. If both transactions run at the same time and read the
    same previous
    (committed) balance and they both complete but the first one completes last
    then the customer is screwed to the tune of $4000. This is only the
    simplist
    problem -- for transactions involving complex data structures the
    problems can
    be much more subtle than that (and more difficult to correct).

    -- Aaron Watters
    ===
    in theory, theory is the same as practice.
    in practice, it's more complicated than that.
     
    Aaron Watters, Jan 12, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DKode
    Replies:
    3
    Views:
    671
    =?Utf-8?B?RGF2ZQ==?=
    Apr 29, 2005
  2. Ken North
    Replies:
    0
    Views:
    618
    Ken North
    Jul 14, 2005
  3. Marc
    Replies:
    8
    Views:
    351
    John J Lee
    Jan 12, 2004
  4. Tim Peters
    Replies:
    2
    Views:
    284
    Jeremy Hylton
    Jan 12, 2004
  5. Tim Peters
    Replies:
    1
    Views:
    307
    Aaron Watters
    Jan 14, 2004
Loading...

Share This Page