SpineEventEngine / gcloud-java

Support for Spine-based Java apps running under Google Cloud
https://spine.io
Apache License 2.0
3 stars 0 forks source link

Stringified UUID-based DS keys should not be wrapped in JSON #144

Open yuri-sergiichuk opened 4 years ago

yuri-sergiichuk commented 4 years ago

Some of the kind keys, e.g. InboxMessage kind key, use UUID as the key value, but they do store the key value as Stringified JSON message in the storage, e.g.: spine.server.delivery.InboxMessage name:{"uuid":"4c16b7d2-06ff-4280-ba0e-14ffdb9aff3a"}

The problem with such a key format is that any key has the same prefix "uuid":" which clashes with the Datastore best practices.

The better solution here is to use only the UUID value: 4c16b7d2-06ff-4280-ba0e-14ffdb9aff3a