uuid6 / uuid6-ietf-draft

Next Generation UUID Formats
https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
187 stars 11 forks source link

Layout grid for UUIDv7 with Crockford's Base32 encoding (for a new RFC Draft) #100

Closed sergeyprokhorenko closed 2 years ago

sergeyprokhorenko commented 2 years ago
0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│T T T T T T T T T T T T T T T T T T T T│T T T T T T T T T T T T-T T T T T T T T│
├───────┴─┬─────┴───┬───┴─────┬─┴───────┼───────┴─┬─────┴───┬───┴─────┬─┴───────┤
│T T T T T T T T-E E E E V C C C C C C C│C C C C-A A C C C C C C C C C C C C U U┤
├───────┴─┬─────┴───┬───┴─────┬─┴───────┼───────┴─┬─────┴───┬───┴─────┬─┴───────┤
│U U U U U U U U U U U U U U U U R R R R│R R R R R R R R R R R R R R R R R R R R│
├───────┴─┬─────┴───┬───┴─────┬─┴───────┼───────┴─┬─────┴───┬───┴─────┬─┴───────┤
│R R R R R R R R-Z Z M M M M M M M M M M│M M M M M M M M M M M M M M M M M M M M│
└───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘

T - timestamp incremented on counter overflow E - version A - variant V - zero initialized counter (counter overflow protection) or randomly initialized counter C - randomly initialized counter U - randomly initialized counter and/or node identifier (N) and/or pseudo-random data R - pseudo-random data Z - zero bits for Crockford's Base32 encoding or application specific metadata attached to UUID (optional, detachable and any length) M - application specific metadata attached to UUID (optional, detachable and any length)

The length of the segments is subject to further discussion.

The numbering of bits from zero confuses me, but it is kept for compatibility.

sergeyprokhorenko commented 2 years ago

Closed in favor of uuid6/new-uuid-encoding-techniques-ietf-draft#1