💡 Add ULID support
I have an idea!
Basically we use UUID for our applications, but new ULID identifier a quite bit faster and ensures that the IDs can be monotonically ordered and can be sorted even when generated within a millisecond.
Here is the ULID specs:
- 128-bit compatibility with UUID
- 1.21e+24 unique ULIDs per millisecond
- Lexicographically sortable!
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
- Uses Crockford’s base32 for better efficiency and readability (5 bits per character)
- Case insensitive
- No special characters (URL safe)
- Monotonic sort order (correctly detects and handles the same millisecond)
FYI: We have supporting for UUID v7 in https://github.com/cycle/entity-behavior-uuid You can read about it there https://uuid.ramsey.dev/en/stable/rfc4122/version7.html
I use Ulid for almost all entities PKs wrapped in ValueInterface, it works great. I'm thinking about switching to a entity-behavior, but turns out I actually like the control I have over values assignment, so I'm used to setting PKs manually.
There's ought to be another plugin entity-behavior-uid that uses Symfony Uid package. 🙈 (Symfony Uid also supports Ulid among regular UUIDs)
I use Ulid for almost all entities PKs wrapped in
ValueInterface, it works great. I'm thinking about switching to a entity-behavior, but turns out I actually like the control I have over values assignment, so I'm used to setting PKs manually.
The same. I prefer to generate UUID in a separated service.
For further clarity, I found this draft document beneficial: UUIDv6 Draft. After examining it, I suggest that ULID could be substituted with UUIDv7. The good news is that the ramsey and cycle packages supports UUIDv7 and should cater to your requirements.