Approach 1: if you requirement is just to assign unique id, you may use UUID as unique row id:
Only drawback is that the id length is 36 bytes.
Approach 2: Create a centralize system to assign unique id. I use REST based API which follow a pattern to generate id and each map operation calls REST service to get unique id.
2nd approach gives you full control to design the pattern for id.