[Zope-dev] ZPatterns: Attribute Providers

Steve Alexander steve@cat-box.net
Thu, 18 Jan 2001 16:57:21 +0000


Here's my understanding of how Persistent Attribute Providers work:

Persistent Internal Attribute Provider

   DataSkins and Attributes are ultimately stored like this:


    Rack's BTree
       |
       |
       | Slots: key:value
       |
       |-('ZPatterns.Rack','Self') : DataSkin instance
                                     ...which has the attribute __dict__
                                        containing its attributes
                                        {'id':object_id,
                                         'foo':value for foo,
                                         'bar':value for bar}

Persistent External Attribute Provider

    Rack's BTree
       |
       |
       | Slots: key:value
       |
       |-('ZPatterns.Rack','Self') : DataSkin instance
       |                             ...which has the attribute __dict__
       |                                containing 'id':object_id
       |-foo:value for attribute foo
       |-bar:value for attribute bar


The key ('ZPatterns.Rack','Self') is the special SelfKey that racks use 
to ensure there is a unique place in a slot to put the slot's object.


Do I have this right?

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net