stacksync / sync-service

[DISCONTINUED] StackSync's synchronization service
Apache License 2.0
55 stars 15 forks source link

Change auto-incremented keys to UUID #2

Open adrianmo opened 10 years ago

adrianmo commented 10 years ago

Look at "uuid-ossp" Postgres extension in postgresql-contrib-9.1 package.

adrianmo commented 10 years ago

Users, Workspaces and Devices already use UUID.

For Items, we better find a custom solution that would allow sequential ordering as it may be useful in the future. An approach would be to have a few bits to identify the sharding, a few more to the current time in millis, and the rest a sequential number.

Related work: http://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram