خرید بک لینک

Vote count: 0

I'm looking for an algorithm which generates identifiers suitable for both, exteal use in e.g. URLs as well as persistence with the following requirements:

  • Short, like a max. of 8 characters
  • URL-friendly, so no special characters
  • Human-friendly, e.g. no ambigous characters like L/l, 0/O
  • Incremental for fast indexing
  • Random to prevent guessing without knowing the algorithm (would be nice, but not important)
  • Unique without requiring to check the database

I looked at various solutions, but all I found have some major tradeoffs. For example:

  • GUID: Too long, not incremental
  • GUID base64 encoded: Still too long, not incremental
  • GUID ascii85 encoded: Short, not incremental, too many unsuitable characters
  • GUID encodings like base32, base36: Short, but loss of information
  • Comb GUID: Too long, however incremental
  • All others based on random: Require checking the DB for uniqueness
  • Time-based: Prone to collisions in clustered or multi-threaded environments
asked 44 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 16 فروردين 1395 ساعت: 6:23

صفحه بندی