uulid.go
Ulid
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
uulid.go
-
New UUID Formats – IETF Draft
For those interested in time based UUIDs, I've written libraries in Ruby and Go to move quickly between them:
https://github.com/sudhirj/uulid.go
-
Timeflake: 128-bit, roughly-ordered, URL-safe UUIDs
There’s a spec called ULID that’s pretty much this with default base32 encoding
https://github.com/ulid/spec
I’ve also worked on a UUID-ULID bridge for Go
https://github.com/sudhirj/uulid.go
And seeing as this is just 128 bits it’s quite easy to move seamlessly between formats and representations.
I’ve found this concept especially useful in nosql stores like DynamoDB, where using a ULID primary key makes objects time sortable automatically. It’s also quite easy to query for items by zeroing out the random component and setting only the time stamp bytes.
Ulid
-
How to use performant Guid as primary keys in databases. UUID Version 7 to the rescue!
Side note, an interesting thing to add to your benchmarks would be ULID https://github.com/Cysharp/Ulid
-
New UUID Formats – IETF Draft
I’m using Postgres so I actually have it a little easier with its native sort order. I switched from NUlid that I was using from years back to this one [0], and the default .ToGuid() gets the desired sort order when used with Npgsql. Likewise though, no db-side generation of uuid - then again, isn’t that the benefit of using globally unique identifiers in the first place, to avoid needing to rely on the db to generate conflict-free identifiers, skipping HiLo or sequences, etc.
Anyway, nice to meet another .NET Ulid user in the wild!
0: https://github.com/Cysharp/Ulid
What are some alternatives?
timeflake - Timeflake is a 128-bit, roughly-ordered, URL-safe UUID.
uuid6-ietf-draft - Next Generation UUID Formats
ulid-mssql - Implementation of ULID generator For Microsoft SQL Server
ksuid - K-Sortable Globally Unique IDs
Pomelo.EntityFrameworkCore.MySql - Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector
Entity Framework - EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
spec - The canonical spec for ulid
shortuuid.rb - Convert UUIDs & numbers into space efficient and URL-safe Base62 strings, or any other alphabet.
shortuuid.go - Encode large numbers and UUIDs into space efficient strings