using gae datastore, have post entities, parents user entities (i.e. user wrote post).
currently create link share specific post, use post.key.urlsafe(). works fine links long! i'd create unique short code/string (say 8-10 chars) include in url can use lookup post (something bitly.com link).
i add simple datastore model store short-codes , keys (without parents) if multiple users posting simultaneously might hit ~1 per second update limit, add new codes list. if parents user entities (say) there'd no way transaction ensure new, random short-code unique?
so how can build scalable solution create short-codes looking posts?
Comments
Post a Comment