[Zope] Upgrading Zclasses

Martijn Pieters mj@antraciet.nl
Thu, 22 Jul 1999 15:04:54 +0200


At 14:32 22/07/99 , Itamar S.-T. wrote:
>Rob Page wrote:
>
> > If you distribute a ZClass definition and then upgrade it it will still
> > have the same id.  As a result, when you overwrite the new ZClass
> > definition over the older one, it also will have the same class
> > definition.  Restarting Zope will cause the new ZClass definition to be
> > loaded and the instances get the new behavior...  Pretty cool...
>
>What happens if two different people create ZClasses with the same IDs?
>
>For example:
>Alice creates ZClass Foo.  It gets an ID of 2.
>Bob creates ZClass Bar.  It also gets an ID of 2.
>
>Bob imports Foo.  Since its ID is already used, I assumes it gets assigned a
>new one, lets say 3.
>
>Alice changes Foo, and sends Bob the new Foo.  When Bob overwrites the old
>Foo with the new, Zope has to know the Foo's id was changed to 3 from 2. (I
>admit to adding the second rhyme on purpose).

The ID's generated for ZClasses are pretty random and big. I do not know 
the exact numbers, but the chances of two ZClasses having the same ID are 
so remote, that you won't see it happening in your lifetime, nor in those 
of the next generations.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------