Live data from Hacker News

Cosmologically Unique IDs

jasonfantl.com

61–70 of 159 posts

Re: Cosmologically Unique IDs

#61
post #18

I forget the context but the other day I also learned about Snowflake IDs [1] that are apparently used by Twitter, Discord, Instagram, and Mastodon. Timestamp + random seems like it could be a good tradeoff to reduce the ID sizes and still get reasonable characteristics, I'm surprised the article didn't explore there (but then again "timestamps" are a lot more nebulous at universal scale I suppose). Just spitballing…

Getting the entire universe to agree on a single clock for creating timestamps sounds absurdly difficult. Probably impossible?

The temperature of the cosmic microwave background can be used as a universal clock.

Re: Cosmologically Unique IDs

#62
post #18

I forget the context but the other day I also learned about Snowflake IDs [1] that are apparently used by Twitter, Discord, Instagram, and Mastodon. Timestamp + random seems like it could be a good tradeoff to reduce the ID sizes and still get reasonable characteristics, I'm surprised the article didn't explore there (but then again "timestamps" are a lot more nebulous at universal scale I suppose). Just spitballing…

There also DRUUID: https://gist.github.com/bricss/53e5babedf44bf3ab71334c15102e...

Re: Cosmologically Unique IDs

#63

Earlier quoted context omitted.

You must consider both time and locality. From now until protons decay and matter does not exist anymore is only 10^56 nanoseconds.

That's such an odd way to use units. Why would you do 10^56 * 10^-9 seconds?

Nanoseconds is a natural unit for processors operating around a GHz, as it's roughly the time of a clock cycle.

If a CPU takes 4 cycles to generate a UUID and the CPU runs at 4 GHz it churns out one every nanosecond.

Re: Cosmologically Unique IDs

#65
post #52

Earlier quoted context omitted.

You must consider both time and locality. From now until protons decay and matter does not exist anymore is only 10^56 nanoseconds.

Protons (and mass and energy) could also potentially be created. If this happens, the heat death could be avoided. Conservation of mass and energy is an empirical observation, there is no theoretical basis for it. We just don't know any process we can implement that violates it, but that doesn't mean it doesn't exist.

Conservation laws result from continuous symmetries in the laws of physics, as proven by Noether's theorem.

Re: Cosmologically Unique IDs

#66
Chiming in from the decentralized world - there’s an adversarial / cooperative dynamic in the assignment of these IDs - and the selection of parents, not discussed in the original. I think you could possibly get to sub linear by allowing a small number of cooperative nodes to assign new IDs.

On the contrary, having the right to assign IDs is powerful; on balance, to my mind the right thing to do is some sort of a ZK verifiable random function, e.g. sunspot-based transformations combined with some proof of ‘fair’ random choice. In that case, I think the 800 bit number seems like plenty. You could also do some sort of epoch-based variable length, where for the next billion years or so, we use 1/256 of the ID space, (forced first bit to 0), and so on.

Re: Cosmologically Unique IDs

#67

I'd propose using our current view of physical reality to own a subset of the UIID + version field if new physics is discovered. 10-20 bits: version/epoch 10-20 bits: cosmic region 40 bits: galaxy ID 40 bits: stellar/planetary address 64 bits: local timestamp This avoids the potentially pathological long chain of provenance, and also encodes coordinates into it. Every billion years or so it probably makes sense to re…

offset length

  00     04:    Version + Flags
  04     08:    Timestamp (uint64)
  12     16:    Node/Agent Hash
  28     16:    Namespace Hash
  44     32:    Random Entropy
  76     20:    Extra / Extension
  96     32:    Integrity Hash
Total: 128bytes

Re: Cosmologically Unique IDs

#68

Note that they almost immediately contract from 'the universe' to 'the visible universe', which isn't the same thing at all.

It's observable universe, and that's the only thing that matters. Events outside the observable universe are causally disconnected. We will never interact with anything outside the observable universe. For all practical purposes, it's the same thing.

Re: Cosmologically Unique IDs

#69
Specifying a CSPRNG as an entropy source to avoid collision is incorrect.

CSPRNGs make prediction of the next number difficult (cracking-AES difficulty) but do not add entropy and must be seeded uniquely otherwise they will output the same numbers. Unless the author is proposing having the same machine generate a single universe-scale list in one run.

Also “banning” ids that are all 1s or 0s is silly; they are just as valid and unique as any other number if you’re generating them properly. Although I might suggest purchasing a lottery ticket if you get an UUID with all settable bits as 1.

Re: Cosmologically Unique IDs

#70
post #7

This analysis is not quite fair. It takes into account locality (i.e. the speed of light) when designing UUID schemes but not when computing the odds of a collision. Collisions only matter if the colliding UUIDs actually come into causal contact with each other after being generated. So just as you have to take locality into account when designing UUID trees, you also have to take it into account when computing the o…

Reminds me of a time many years ago when I received a whole case of Intel NICs all with the same MAC address.

It was an interesting couple of days before we figured it out.

Post reply on HN