Our great sponsors
-
deterministic-guid-generator
Create a deterministic GUID based on namespace Guid, a string and an optional version.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
flow
🌊 Continuously synchronize the systems where your data lives, to the systems where you _want_ it to live, with Estuary Flow. 🌊 (by estuary)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
If size isn't an issue it seems so. I know of one implementation that uses wall clock to get a "close enough" sorting https://github.com/segmentio/ksuid
Tbh. I love UUID's.
The next thing i prefer is Deterministic UUID's,
eg. DeterministicGuid.Create(tenantNamespace, "my-tenant-name");
Note: https://github.com/Informatievlaanderen/deterministic-guid-g... for dotnet.
Tbh. I love UUID's.
The next thing i prefer is Deterministic UUID's,
eg. DeterministicGuid.Create(tenantNamespace, "my-tenant-name");
Note: https://github.com/Informatievlaanderen/deterministic-guid-g... for dotnet.
We use a macaddr8 that embeds a wall-clock timestamp (so they're ascending order, achieving data locality) with some additional randomness. It's worked really well for us:
https://github.com/estuary/flow/blob/master/supabase/migrati...
we use macaddr8 instead of bigint, because it has a postgres serialization / JSON encoding which lossless-ly round-trips with browsers and it works well with PostgREST. The same CANNOT be said for bigint, which is a huge footgun.
The stated downsides come from poor data locality when using mostly random UUIDs; but you can keep most of the benefits of a globally unique identifier, and retain locality, by using UUIDv7.
At jetpack.io we've been doing exactly that via TypeIDs: https://github.com/jetpack-io/typeid and there's a PostgresSQL implementation available. TypeIDs are UUIDv7 with additional type information, so you also get type-safety in your IDs.