This is an Engineering Notebook post: feel free to ignore.

This post discusses a new command line argument for Leo: --uuid

I have no plans to implement --uuid now, but it may have to be done in 
future.

===== Rationale

Terry has convinced me that collisions between both user ids and timestamps 
will become more frequent as Leo becomes more popular.  Such collisions are 
not a serious problem at present: the odds of two different people with the 
same user id sharing .leo files is small.

Nevertheless, a serious problem lurks, one that can not, even in principle, 
be solved with Leo's present gnx's.  

Suppose two people have the same id. Then Leo *must* assume that those 
people are actually the same person!  As I have explained in other post, 
this can lead to data loss if the two people create two *distinct* nodes 
with the same gnx, and then try to merge those nodes into the same .leo 
file. The odds of this happening are small, but increasing.

A good way to solve this problem is to use uuids, 
http://en.wikipedia.org/wiki/Universally_unique_identifier, which python 
supports in the uuid module: https://docs.python.org/2/library/uuid.html

===== Operation

The --uuid should cause Leo to use uuid's for all *new* gnx's.  The uuid 
option should not convert *existing* gnx's to uuid-based gnx's.

A new Leo command would convert all existing gnx's to uuid-based gnxs. Such 
mass conversions should *never* be done automatically.

===== Format of uuid-based gnxs

I would like the uuid-based gnx's to use uuid's in *addition* to the id and 
timestamp fields.  Something like::

    id.timestamp..uuid

Alas, that does not seem possible, unless this kind of gnx is written to 
external files (in node sentinels). But many users would complain that such 
very-long gnx's clutters external files too much.

So it seems that new-style gnxs would have something like this form::

    ..uuid

The leading dots allow Leo to distinguish this kind of gnx from the old 
forms::

    id.timestamp.n
    id.timestamp

provided that dots are not allowed in ids.

===== Summary

Leo's uuid-based gnxs can contain neither user ids nor timestamps.  Sigh.

We must ensure we stick with whatever new-style gnx format we choose 
initially: we don't want to burden Leo with distinguishing between several 
different forms of uuid-based gnxs.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to