Put without needing to define the key (auto generate unique key)

AeroSpike has a great data distribution system, and i think it would be better if the clients have a same standard of defining unique primary key (like Cassandra using type 1 UUID or MongoDb’s ObjectId), so we can have the client to automatically generate a unique primary key, so when the client want to create a new record, it can just issue a put command, without worrying about the any collision.

1 Like

A unique/primary key sequence is likely to be a CRDT (Conflict-free Replicated Data Type) counter. I’d like to see the counter be allowed to use elsewhere not limited to unique key generation.

Seems like using a GUID/UUID generated in the application would work just fine? Is that not an option?

I just realize this topic is to have a unique key generator but not a global “sequence” generator like traditional relational database. And it’s better to make my point a separated request.

UUID + a write policy with RecordExistsAction as CREATE_ONLY (for Java) should meet the need to avoid collision

Yes, that’s exactly right.

In a distributed system you can cook up a bunch of other ideas, like having an always-incrementing counter and ranges within it, but you’ve always got a wrap around problem, and a central point (although it’s a distributed central point!).

A GUID / UUID works better, especially with CREATE_ONLY —