John Clayton
John Clayton

Reputation: 1081

Is there any advantage to server-generated UUIDs in RethinkDB?

I've been letting RethinkDB generate IDs and have run into a case where it would be beneficial to generate the ID on the client.

Am I safe generating a UUID in the app? Is there any benefit of using r.uuid() instead, such as ordering, indexing, or other performance improvement?

Upvotes: 2

Views: 113

Answers (1)

coffeemug
coffeemug

Reputation: 1348

You're safe generating the IDs in the app. The main benefit of server-generated uuids is that the server takes care of the ID generation so you don't have to worry about it. But if you have a case where you want to use custom IDs, go for it! This is expected in the RethinkDB server and won't cause any issues.

Upvotes: 2

Related Questions