monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] newbie question - SHA1 vs serials


From: K. Richard Pixley
Subject: Re: [Monotone-devel] newbie question - SHA1 vs serials
Date: Tue, 19 Apr 2005 08:08:47 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Jon Bright wrote:
Hi,
Hey.  :-).
To provide globally unique serials, one would need to include some representation of the location at which an event occurred.
It's an idea that's been considered, but has a number of difficulties:

1. Not everyone's machine has a (valid) domain name.  I have a number of domains, so I could pick one, but if I didn't, the only name I'd have would be p34543522.dip.t-dialin.net or whichever name my ISP gives me today.
This is why I suggested that the repository be named.  Presumably, the name would be based on domain name, but the real point is that domain names follow hierarchical delegation.
2. I could be operating two (or more) separate monotone DBs on the same machine.  OK, we could make some special effort to try and get the two copies to know about each other's numbers.
I wouldn't bother.  I'd just name them with subdomains.

Personally, I'm going to mock all my repositories to look like the company's domain.  So project1.noir.com, project2.noir.com, etc.  They don't really correspond to domain names with unique IP addresses, but to cnames.

You wouldn't even need to own the domain name that corresponded to your repository name, though in that case, you do stand the risk of colliding with anyone who really did own that domain.
3. I have machine foo.bar.com - what to do about some unpleasant person who decides to incorrectly name their machine foo.bar.com too?  (There are a number of workarounds for this, each with advantages and disadvantages)
You do nothing.  It's up to the administrator of bar.com to resolve this collision.  Only one of you is actually authorized to use this name.  Repository name doesn't necessarily change with IP or domain name change.

Now, if you decided to change the name of an existing repository, that might represent a potential problem.  The new name would work, but anyone who ever tried to reuse the old name would create a collision.  I'm not sure this is a problem in practice, though.
4. The number's not actually monotonically increasing when viewing the tree as a whole.  Ignoring branches, I'd still get

1:foo.bar.com
      |
1:baz.foo.com
      |
2:baz.foo.com [...]

...which kind-of seems to defeat the point.
The point is two-fold:

1) provide human readable visual ordering.  Since global ordering really isn't possible, the only ordering that has any meaning is per-repository ordering.  And that's what you're seeing.

2) providing unique id's.

I think serials on named repositories do address these points.

--rich

reply via email to

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