On Sep 11, 2012, at 5:20 PM, Kris Borchers wrote:
Hey everyone, I just wanted to let you know I have been doing a
little research around generating id's on the client side. I have found a little JS
utility lib that I am thinking about using that generates RFC4122 compliant UUIDs.
+9001
That library is here
http://www.broofa.com/Tools/Math.uuid.js if you
are interested. Bruno thought it would be a good idea that I send this out for everyone as
it may be a good idea to see what is available in the Android and iOS world in terms of
generating similar id's.
I have been thinking about this a bit lately and am also hoping to get people's
thoughts on whether or not this may be overkill.
It's not overkill at all,
it's standard practice when you don't have 100% server uptime (which is easily to
see over a 3G connection)
The reason I say that is that really the only reason you would need
such a unique id is if there will be a chance of something else (another client, server,
etc.) generating an id for a piece of data that would conflict with this one. What I was
thinking though is that is only an issue at sync time. As long as you know the id is
unique in the client, and the status of that piece of data (new, modified, removed), then
at sync time, you can rectify those id's that are out of sync with what is generated
at the server and you have one point of id generation.
Using UUID's will save us
a lot of headaches on the long run - even having sync statuses for our data
Would really appreciate others' thoughts on this.
Kris
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev
-- qmx