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

Consider changing DS key generation schemas #145

Open yuri-sergiichuk opened 4 years ago

yuri-sergiichuk commented 4 years ago

Having the same Datastore key prefix is considered a bad practice that leads to the Datastore performance degradation.

We now have such prefixes for LifecycleFlags in DsAggregateStorage. The other prefix-based key is used for Snapshots.

In DsProjectionStorage we also have such a prefix for last handled event time. An additional note for DsProjectionStorage is that we use google.protobuf.Timestamp as a kind for the last event timestamp which is misleading.