[MUD-Dev] Re: [DevMUD] Re: Database module

cynbe at muq.org cynbe at muq.org
Mon Dec 21 23:22:33 CET 1998


-----BEGIN PGP SIGNED MESSAGE-----


On 22-Dec-98 J C Lawrence wrote:
> 
> On Sun, 20 Dec 1998 12:05:57 -0800 
> Jon Leonard<jleonard at divcom.slimy.com> wrote:
> 
>> Things that we want to look up in the database have numeric IDs to
> 
> I went thru the problem of ObjectID's and their re-use on MUD-Dev
> extensively.  A key problem is that there may be pointers or
> references to an object after the object has been destructed, and that
> once you have an ObjectID->human_readable->ObjectID translation
> mapping, you can never guarantee that a reference count is accurate.

JLC's solutions, as always, are sensible and effective.

I've been using a slightly different wrinkles for similar problems:

(1) Instead of using a time_t as guard bits, one can use a trulyRandom
    integer.  It is often practical to make this long enough to make
    collision probability effectively zero for the purposes at hand.
      If you have to code trulyRandom integer generation up from scratch,
    this may not be worth the effort, but almost any distributed system
    these days will have true random bits implemented for public-key &tc
    purposes, so the incremental cost of using them is often very low.

(2) If you need to pass numbers through human channels, a possible
    improvement on UUENCODE-ing style translation is:
     (a) Pick a set of 1024 words (probably short, single-syllable words)
     (b) bite off 10-bit chunks from your integer, and use each to select
         a word from the set:  A 64-bit integer becomes seven words.
    The result will be a number encoding with much more mnemonic value to
    native speakers than the corresponding UUENCODE-ed version:  I'm sure
    any of us can remember seven words easier than 16 random hex digits.
      (For extra credit:  Pick separate verb, noun and adjective sets of
    1024 words, and arrange for your numbers to make grammatical sentences.
    I'll bet this will increase the mnemonicity of the encoded numbers
    significantly.)

 Cynbe



- ----------------------------------
E-Mail: cynbe at muq.org
Date: 21-Dec-98
Time: 23:10:46

This message was sent by XFMail
- ----------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv

iQCVAwUBNn9IuT35srNZ3GptAQFa+AP5AejRxpBCSKiUuIjM8i2qXg9peZbh35Ma
eh+tJT7KCt6RAIMwkVfO9A0nQAL04lKW3jRoc4wJP2vtYbcmjpd/UcJLjNNdoquF
+98OS7w0yjFTzY9qfJDgYoI65UUEzXtsZOzS1ABN6eCFwRQZhd9xgQmMdV2LMobq
Cji09lYpUU0=
=8hRQ
-----END PGP SIGNATURE-----




More information about the mud-dev-archive mailing list