• Jean Michel Rouly's avatar
    Merge branch 'hashid_generation' into 'dev' · 4a8076f8
    Jean Michel Rouly authored
    Hashid generation
    Use Hashids to generate shortUrls.
    Right now we will hit collisions at a 50% rate at 10k urls assuming perfect randomness. Using hashids reduces the chance of collisions as the number of urls increase.
    Hashids are guarenteed unique. The downside being that as the number of urls get larger, the hashids will get longer as well. The rate is exponential though with roughly number of characters as log base alphabet length of (id + seed).
    See merge request !10
models.py 2.09 KB