Is QLDB Document ID a globally unique UUID
In various places in the documentation the document ID is described as a unique identifier. e.g.
https://docs.aws.amazon.com/qldb/latest/developerguide/working.create.html
Is the document ID truly a GUID/UUID that uniquely identifies that document not only within a specific ledger, but across ALL possible ledgers?
Is the document ID safe to expose to the outside world as a truly unique identifier?
Will all document ID's be guaranteed to always be exactly 22 chars in length and match the regex
/^[A-Za-z0-9]{22}$/i
Is a document ID lexically sortable?
Can you describe the format and internal state of the document ID (perhaps compared to the various types of UUID as defined by RFC 4122? I can find no detailed description of this ID. It would be helpful for this to be defined in the documentation.
https://en.wikipedia.org/wiki/Universally_unique_identifier
Thanks.
Edited by: glenn-truestamp on Jun 27, 2020 12:30 PM
Edited by: glenn-truestamp on Jun 27, 2020 12:33 PM
Edited by: glenn-truestamp on Jun 27, 2020 12:47 PM
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
Relevant questions
How to set document id when delivering data from Kinesis Data Firehose to Opensearch index
asked 4 months agoIs QLDB Document ID a globally unique UUID
Accepted Answerasked 2 years agoReason for providing the 'source-dbi-resource-id' parameter in the AWS RDS CLI command 'restore-db-instance-to-point-in-time'?
asked 6 months agoWhat is a thingId?
Accepted Answerasked 4 months agoWhy is entity ID and event ID important in Amazon Fraud Detector?
Accepted Answerasked 2 years agoWorker ID is not showing up in the requester portal for approval
asked 4 months agoQLDB - query - Getting all documents which were inserted after some document of given UUID
asked 6 months agoInvalidRequestException Asset Model Property name is not unique
asked 8 months agoWhy is the number 0x232b318c in AZ_CRC("Game", 0x232b318c)?
Accepted Answerasked 4 years ago[API Gateway] What is the maximum size of the connection ID used in @connections commands?
asked 3 months ago