From: Omer Zak (email@example.com)
Date: Tue May 20 2003 - 11:53:04 EDT
On Tue, 20 May 2003, F J Franklin wrote:
> On Tue, 20 May 2003, Omer Zak wrote:
> > In the various Unix variants, a similar problem exists when creating a new
> > process and needing to assign it an unique ID (PID).
> > It may be a good idea to review PID generation algorithms used in Linux.
> The real problem is not the generation of unique IDs, which is simple
> enough to do, but rather the merging of document fragments each of which
> has its own set of IDs and ID references. When merging documents, the
> safest method (though probably very difficult as long as we use linear
> import) is to replace all IDs with new document-unique IDs and to map all
> ID references to the appropriate new IDs.
Are the IDs limited to a certain length (such as 32 bits)?
If not, then when merging a document into another document, prefix all
IDs of the newly merged document with a timestamp. The same timestamp
string will be prefixed also to ID references, so no mapping of IDs needs
to be maintained.
About user-assigned IDs: they too need to be kept unique. If the user
wants one document to refer to an ID in another document, merged with it,
then he has to explicitly set the ID. If the timestamp is human-readable,
then it'll not be difficult to recognize the IDs.
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
This archive was generated by hypermail 2.1.4 : Tue May 20 2003 - 12:07:01 EDT