Dear group,

in order to validate the e-mail address entered by a user, I want to
create a classic "opt-in"-kind of e-mail which is sent to the user and
that contains a link on which the user has to click to validate his
address. Part of this link is a unique identifier.

I played around with a couple of ways to generate identifiers which do
not look too simple (short integers, such as primary key values), not
to complicated (too long or cryptic) and not too predictable (System
time). My current favorite is to generate a random integer, to convert
it to a alphabetical representation and to prefix it with a primary
key value of a entity I store to the database when creating the
identifier.

The reason for using the primary key is that I did not find another
way to prevent that instances of my application running on GAE
generate by chance at the same point in time the same identifier. My
assumption is, that the key of an entity generated in BigTable is
unique by design, no matter how many threads or instances of my
application are creating the entities at the same point in time.

Im am pretty satisfied by this approach, the result doesn't look too
bad; I've summarized my approach in a blog post: http://t.blog.de/6e39c9/.
However, while searching through this group and other pages on the web
I wondered how transactions may come into play when ensuring
uniqueness of a certain value.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to