Kevin Day - 2005-04-13

Hi - not sure how much development is still going on with JDBM, but I wanted to float an idea and see if there were any objections to it.

In many situations, the data stored in the key of a BTree (and probably an HTree) contains data that is also contained in the value stored in that tree.

For example, if I have an object that has a name (among other properties), and the name is the key for the Btree, then storing this object in the BTree effectively stores two copies of the name property.

I'm wondering if a special version of the serializer interface may be a good idea.  Let's call it KeyedSerializer.

It would have a special deserialize method that would take the Key as an argument (in addition to the byte array of data).

deserialize(byte[] data, Object key)

The deserializer could then use data from the key to populate properties in the new value object it creates.

I'm not sure if this is a completely bogus thought, and I was wondering if anyone had any comments.

Thanks!

- Kevin