Of keys and MAXHANDLE
Marten Terpstra
Thu Apr 7 20:23:20 CEST 1994
Laurent Joncheray <lpj at merit.edu> writes * Ok dudes, i didn't mean to be nasty :-) The only thing i like * you to change to your software is: * Generate a key which reflects the type of the referenced object. For * instance if you make a key for an AS, you can generate the key: * "*an:AS1755" instead of just "as1755". Same thing for the person: * "*pn:AS1755" instead of just "as1755". So nasty people like me won't * screw up other nicw people's data. * -- lpj OK, let me try and explain the key generation in a bit more detail. For each object a set of keys is generated (eg firstname and lastname for persons) PLUS a unique key, which is only used when adding/deleting objects, never for normal lookups. The unique key for an object is defined in the config, with the addition of something special which makes it different from another object that might have the same unique key. The special bit added is the sort key (also defined in the config) with a % sign added. So, for instance for an AS the unique key would for instance be %0as1755, and a person with name AS1755 would have unique key %3as1755. The idea is basically the same. There is only one unique key per object. The reason why it is never used in queries is that from a query you (usually) cannot determine what kind of object you are looking for (person as1755 or autonomous system as1755) so that is where the normal keys are used (as1755 as key would point to both the person and the autonomous system object). When updating an object, you know the object type, so you can use the unique key to uniquely locate the object. You can see all the keys by doing a showdbm on one of the databases. We know this increases the numberof keys quite significantly, but it helps making things easier. The routines that generate the keys in the RIPE s/w are enukey.pl for the unique key, and enkeys.pl for all other keys. Is this what you are looking for? If not, could you explain why you would like to see what you propose? The change is indeed quite simple, although there might be some timing issues, but it could be done. -Marten -------- Logged at Thu Apr 7 20:48:50 MET DST 1994 ---------
[ rr-impl Archive ]