gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz] Global cell IDs


From: B. Fallenstein
Subject: [Gzz] Global cell IDs
Date: Sat, 25 May 2002 20:34:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:0.9.9) Gecko/20020414 Debian/0.9.9-6

Hi!

I was thinking about global cell ids. So far they contain the id of the mediaserver block in which they were created-- which is difficult, because we need to mention them in that mediaserver block *before we know the block's id*.

It gets harder: think about different slices refering to each other. If we create a cell X in slice A and a cell Y in slice B, and then transclude X into B and Y into A, and then save, we have a REAL problem: we cannot save B before we know the global identity of Y, so we need to save A, but we cannot save A before we know the global identity of X...

Additionally, we do not know a new cell's global id before we save it, which is annoying.


There's a simple solution for this: Don't use block ids as part of the cell ids. Instead, use a secure random number. -- We generate one when Gzz starts up and then increment a counter each time we create a new cell, yielding 'FOO-nnn' cell ids as before. (However, we can encode them as base64, sparing us some more screen space.)

I know this slows down startup, because we need to initialize the random number generator. BUT, we need to do that anyway: without it, we cannot save Mediaserver blocks (we currently do, but it's not secure when publishing). So there's no additional cost in this really.

When the speed penalty gets too annoying (especially when running the tests), we can use a native implementation of SecureRandom that uses /dev/urandom (there's one around somewhere, someone should look into it).


- Benja




reply via email to

[Prev in Thread] Current Thread [Next in Thread]