Trying out UUIDV7 (date sortable unique identifiers), for the first time I think. I’m modeling some data, where “users" create "entries” over time, to be stored in DynamoDB (which doesn't allow arbitrary queries). I want to use the user ID as the partition key, and an entry ID (which is what I'm using UUID V7 for) as the sort key, and I will often want to find a user's most recent entries. So seems like a good fit.

My main concern is relying on the logical ordering of the event ID too much, since it's not something that I want to change after the fact. I'm not too worried though since I can always just treat it as an opaque UUID too.

@mikebroberts That works really well for a DynamoDB sort key (ULID is great too)! Highly recommend. Make sure the implementation you use implements the monotonicity portion of the spec, otherwise you'll see ordering issues, particularly noticeable in tests.
@james Thx. Yeah, I'm hoping that https://github.com/uuidjs/uuid 's implementation of v7 works as advertised!
GitHub - uuidjs/uuid: Generate RFC-compliant UUIDs in JavaScript

Generate RFC-compliant UUIDs in JavaScript. Contribute to uuidjs/uuid development by creating an account on GitHub.

GitHub
@mikebroberts @james +1 to checking out ULID too--similar properties, but can be marginally better in some use cases (and easier/faster to generate mebbe?)