Re: [ZODB-Dev] The database root: It's a trap!

2010-05-12 Thread Jim Fulton
On Wed, May 12, 2010 at 7:07 AM, Jim Fulton j...@zope.com wrote:
 B. Change ZODB so that the root object is a variant of persistent
   mapping that either refuses to store more than a small number of
   objects, or at least issues a warning when more than a small
   number of objects is stored.

A variation on this, either in addition or as an alternative, is to
have the database warn and/or error when creating database records
over some tunable size.

Jim

--
Jim Fulton
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] The database root: It's a trap!

2010-05-12 Thread Jim Fulton
On Wed, May 12, 2010 at 7:16 AM, Jens Vagelpohl j...@dataflake.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 5/12/10 13:07 , Jim Fulton wrote:
 B. Change ZODB so that the root object is a variant of persistent
    mapping that either refuses to store more than a small number of
    objects, or at least issues a warning when more than a small
    number of objects is stored.

 Where would you put that limit?

Probably in the class.

Jim

-- 
Jim Fulton
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] The database root: It's a trap!

2010-05-12 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 5/12/10 13:21 , Jim Fulton wrote:
 On Wed, May 12, 2010 at 7:16 AM, Jens Vagelpohl j...@dataflake.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 5/12/10 13:07 , Jim Fulton wrote:
 B. Change ZODB so that the root object is a variant of persistent
mapping that either refuses to store more than a small number of
objects, or at least issues a warning when more than a small
number of objects is stored.
 Where would you put that limit?
 
 Probably in the class.

Sorry, bad wording: How high would you set this limit?  :-)

jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkvqj7MACgkQRAx5nvEhZLKXnwCgglwOPUXe8z9ch10PR+BinvTt
VrIAn2MWh94WgcWfCHrIReoM+ulIV4b9
=ichU
-END PGP SIGNATURE-
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] The database root: It's a trap!

2010-05-12 Thread Jim Fulton
On Wed, May 12, 2010 at 7:23 AM, Jens Vagelpohl j...@dataflake.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 5/12/10 13:21 , Jim Fulton wrote:
 On Wed, May 12, 2010 at 7:16 AM, Jens Vagelpohl j...@dataflake.org wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 5/12/10 13:07 , Jim Fulton wrote:
 B. Change ZODB so that the root object is a variant of persistent
    mapping that either refuses to store more than a small number of
    objects, or at least issues a warning when more than a small
    number of objects is stored.
 Where would you put that limit?

 Probably in the class.

 Sorry, bad wording: How high would you set this limit?  :-)

Dunno, maybe 99.  If we go with a warning, then the risk of setting this
too low is minimal.

Jim

-- 
Jim Fulton
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] The database root: It's a trap!

2010-05-12 Thread Chris Withers
Jim Fulton wrote:
 A. Change ZODB so that new databases have BTrees as root objects.
 
This has the advantage that BTrees are scalable.  It has a number
of down sides:
 
- BTrees should only be used when keys are known to have a stable
  ordering.  If we had a scalable hash data structure, that would
  be better.
 
- This encourages mistake 2 above.
 
 B. Change ZODB so that the root object is a variant of persistent
mapping that either refuses to store more than a small number of
objects, or at least issues a warning when more than a small
number of objects is stored.

C. I'd really like to be able to configure what the root object is as 
database creation time. That way it can be application specific.

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
 - http://www.simplistix.co.uk
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] The database root: It's a trap!

2010-05-12 Thread Chris McDonough
On Wed, 2010-05-12 at 20:16 +0100, Chris Withers wrote:
 Jim Fulton wrote:
  C. I'd really like to be able to configure what the root object is as
  database creation time. That way it can be application specific.
  
  That sounds reasonable, but doesn't address the default behavior.
 
 Default would be an OOBTree for me...
 
 Scales, no thinking or scary warnings required :-)

I'm not sure that any particular default root object is going to solve
this problem, because they're just going to put a dictionary into one of
its keys and hurt themselves that way.  I think the idea of a warning
when a record exceeds a given size would be more generally helpful,
although that of course doesn't prohibit using a different root too.

- C


___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev