- 最新
- 最多得票
- 最多評論
Hi Glenn and thanks for your questions.
The IDs are 128 bit globally unique identifiers. We represent them in base 62, as you note. As long as the underlying value is a 128 bit UUID, the base 62 representation will be a string of 22 characters.
I'm not sure how to answer your sorting question. The sort order of the document ids has no semantic meaning, but obviously it is an operation you can do.
Thanks Marc for answering my Twitter call. :-)
This would be useful info to include in the QLDB docs.
I asked about sorting as some UUID schemes (examples linked below) offer some form of natural time based ordering.
Sortable UUIDs:
https://github.com/ulid/spec
https://github.com/segmentio/ksuid
https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html
Out of curiosity, can you say if the entirety of the 128bits represented in the UUID is purely random entropy? Or is there a time (or other) component mixed in there as well?
Is there a public library used to generate them?
Thanks.
Edited by: glenn-truestamp on Jul 6, 2020 10:19 AM
Hi Glenn,
We'll get the docs fleshed out, thanks for that call out.
Also, thanks for the feature request around sortable document ids. I see a bunch of challenges there, but we'll get it on the backlog regardless!
As of right now, we're not willing to commit to the "UUID type" that we use, as we wish to leave ourselves free to change that (e.g. to implement the feature you just described). My recommendation to you is that you treat the ids as globally unique strings.
EDIT: new docs at https://docs.aws.amazon.com/qldb/latest/developerguide/working.unique-id.html
Edited by: marcbataws on Jul 9, 2020 8:40 PM