Slide 1

Slide 1 text

ULID 01H6CEMR6FXX5BCY6G0PE02VRA UUID vs 587f93d8-7b4d-42df-9d83-5832a7c02947 Unix epoch 48bits Random 80bits 4bits Version 2bits Variant 12bits 62bits 48bits

Slide 2

Slide 2 text

UUID Universal Unique Identifier

Slide 3

Slide 3 text

UUID ULID Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 4

Slide 4 text

UUID ULID 128-bits 128-bits Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 5

Slide 5 text

UUID ULID (16-bytes) 128-bits (16-bytes) 128-bits 128-bit (16-bytes) block of data 128-bit (16-bytes) block of data Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 6

Slide 6 text

UUID 4bits Version 2bits Variant 128-bit (16-bytes) block of data 128-bit (16-bytes) block of data ULID 6-bit reserved for the version and variant Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 7

Slide 7 text

UUID v4 4bits Version 2bits Variant Random 12bits Random 62bits Random 48bits 4 128-bit (16-bytes) block of data 128-bit (16-bytes) block of data ULID 6-bit reserved for the version and variant 122-bit Random data, Good distribution Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 8

Slide 8 text

ULID Unix epoch (Big Endian) 48bits UUID v4 4bits Version 2bits Variant Random 12bits Random 62bits Random 48bits 4 128-bit (16-bytes) block of data 6-bit reserved for the version and variant 122-bit Random data, Good distribution 48-bit Timestamp, Big-Endian encoded 128-bit (16-bytes) block of data Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 9

Slide 9 text

ULID Unix epoch (Big Endian) 48bits UUID v4 4bits Version 2bits Variant Random 12bits Random 62bits Random 48bits 4 128-bit (16-bytes) block of data 6-bit reserved for the version and variant 122-bit Random data, Good distribution Lexicographically sortable, time-based locality 48-bit Timestamp, Big-Endian encoded 128-bit (16-bytes) block of data Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 10

Slide 10 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID v4 4bits Version 2bits Variant Random 12bits Random 62bits Random 48bits 4 128-bit (16-bytes) block of data 128-bit (16-bytes) block of data 6-bit reserved for the version and variant 122-bit Random data, Good distribution Lexicographically sortable, time-based locality 48-bit Timestamp, Big-Endian encoded Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 11

Slide 11 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID v4 4bits Version 2bits Variant Random 12bits Random 62bits Random 48bits 4 4bits Version 2bits Variant Random 12bits Random 62bits Unix epoch (Big Endian) 48bits 7 UUID v7 128-bit (16-bytes) block of data Lexicographically sortable, time-based locality 48-bit Timestamp, Big-Endian encoded 128-bit (16-bytes) block of data 6-bit reserved for the version and variant 122-bit Random data, Good distribution Universal Unique Identifier Universally Unique Lexicographically Sortable Identifier

Slide 12

Slide 12 text

Random-Based Ids

Slide 13

Slide 13 text

Random-Based Ids UUIDv4 NanoId Cuid2 Random Data Distribution

Slide 14

Slide 14 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 Random Data Distribution NanoId Cuid2

Slide 15

Slide 15 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 Random Data Distribution NanoId Cuid2

Slide 16

Slide 16 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d Random Data Distribution NanoId Cuid2

Slide 17

Slide 17 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa Random Data Distribution NanoId Cuid2

Slide 18

Slide 18 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 Random Data Distribution NanoId Cuid2

Slide 19

Slide 19 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 Random Data Distribution NanoId Cuid2

Slide 20

Slide 20 text

Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution NanoId Cuid2

Slide 21

Slide 21 text

Time-Based Ids Random-Based Ids UUIDv4 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution NanoId Cuid2

Slide 22

Slide 22 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 23

Slide 23 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 24

Slide 24 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 25

Slide 25 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 01H6YGDAJKAYX4K1XJ2WYVNCVQ (+100ms) 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 26

Slide 26 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 01H6YGDAJKAYX4K1XJ2WYVNCVQ (+100ms) 01H6YGDANQCEWNZC5DMSGRV46J (+200ms) 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 27

Slide 27 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 01H6YGDAJKAYX4K1XJ2WYVNCVQ (+100ms) 01H6YGDANQCEWNZC5DMSGRV46J (+200ms) 01H6YGZMDFKFXS7M47DW956NWW (+10min) 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 28

Slide 28 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 01H6YGDAJKAYX4K1XJ2WYVNCVQ (+100ms) 01H6YGDANQCEWNZC5DMSGRV46J (+200ms) 01H6YGZMDFKFXS7M47DW956NWW (+10min) 01H6YGZMGKCY1MG4HM9TWHY2XN (+10min) 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 29

Slide 29 text

Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7 01H6YGDAFF12Y7KEZBAPAZRF6A 01H6YGDAJKAYX4K1XJ2WYVNCVQ (+100ms) 01H6YGDANQCEWNZC5DMSGRV46J (+200ms) 01H6YGZMDFKFXS7M47DW956NWW (+10min) 01H6YGZMGKCY1MG4HM9TWHY2XN (+10min) 01H712T1FFXBJ919A0GSQRWMRZ (+24h) 2f52de59-4a7b-45eb-8d71-2df6aa950061 9f108a35-35af-4244-af86-c2222ffb475d efe25407-e91b-4b59-8048-64833b85c7aa 3f56beae-235f-472d-8b40-d80bff249fb9 ace3857f-6b92-483c-a18c-a7c7acd34ea6 e92ee082-4380-4b2e-b599-0bf32d5138ee Random Data Distribution Time-Based Data Locality NanoId Cuid2 Snowflake XID KSUID

Slide 30

Slide 30 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits

Slide 31

Slide 31 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0

Slide 32

Slide 32 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0

Slide 33

Slide 33 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality.

Slide 34

Slide 34 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality. Do not require coordination to be generated, and can be generated offline. Do not require coordination to be generated, and can be generated offline.

Slide 35

Slide 35 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality. Do not require coordination to be generated, and can be generated offline. Do not require coordination to be generated, and can be generated offline. up-to-date databases have UUID type support

Slide 36

Slide 36 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality. Do not require coordination to be generated, and can be generated offline. Do not require coordination to be generated, and can be generated offline. up-to-date databases have UUID type support or BINARY(16) can be used (avoid text format for keys) BINARY(16) can be used (avoid text format for keys)

Slide 37

Slide 37 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality. Do not require coordination to be generated, and can be generated offline. Do not require coordination to be generated, and can be generated offline. Opaque non-guessable IDs 
 using the randomness of UUID v4 up-to-date databases have UUID type support or BINARY(16) can be used (avoid text format for keys) BINARY(16) can be used (avoid text format for keys)

Slide 38

Slide 38 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality. Do not require coordination to be generated, and can be generated offline. Do not require coordination to be generated, and can be generated offline. Temporary non-secure Tokens: 
 the client can check the timestamp for expiration. Opaque non-guessable IDs 
 using the randomness of UUID v4 up-to-date databases have UUID type support or BINARY(16) can be used (avoid text format for keys) BINARY(16) can be used (avoid text format for keys)

Slide 39

Slide 39 text

ULID Random 80bits Unix epoch (Big Endian) 48bits UUID 4bits Version 2bits Variant 12bits 62bits 48bits Encoded as a 26 character string using Crockford's Base32 (5bit per character) 01H6YGDAFF12Y7KEZBAPAZRF6A Encoded as a 36 character string using Base16 (4bit per character) 71acfe9a-7fca-4d41-b0d7-1ba36d7343c0 Lexicographically sortable, time-based locality. Do not require coordination to be generated, and can be generated offline. Do not require coordination to be generated, and can be generated offline. Temporary non-secure Tokens: 
 the client can check the timestamp for expiration. Event Id chronological order of events Opaque non-guessable IDs 
 using the randomness of UUID v4 up-to-date databases have UUID type support or BINARY(16) can be used (avoid text format for keys) BINARY(16) can be used (avoid text format for keys)

Slide 40

Slide 40 text

4bits Version 2bits Variant Random 12bits Random 62bits Random 48bits 4 Random 80bits Unix epoch (Big Endian) 48bits Time-Based Ids Random-Based Ids UUIDv4 ULID UUIDv7