Sortable Collision-Free UUIDs

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • spec

    The canonical spec for ulid

    Looks similar to ULID[0] (I am the author of a popular python implementation[1]).

    It appears to have a similar constraint that two ID's generated within the same timestamp (ms, ns) have no strong guarantee of ordering. That might not be a deal breaker depending on your use case but something to consider.

    * https://github.com/ulid/spec

    * https://github.com/ahawker/ulid

  • fuuid

    Functional UUIDs for Python.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • ulid

    Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3 (by ahawker)

    Looks similar to ULID[0] (I am the author of a popular python implementation[1]).

    It appears to have a similar constraint that two ID's generated within the same timestamp (ms, ns) have no strong guarantee of ordering. That might not be a deal breaker depending on your use case but something to consider.

    * https://github.com/ulid/spec

    * https://github.com/ahawker/ulid

  • uuid-list

    list of unique id implementations, design considerations, and resources.

    i have a loosely curated list of "State of the Art of UUIDs" here: https://github.com/sw-yx/uuid-list/

    just added FUUIDs, thanks OP

  • ulid-creator

    A Java library for generating Universally Unique Lexicographically Sortable Identifiers (ULID)

    I started looking into TSID/KSUID/ULID in order to support cursor based pagination schemes in GraphQL against non-integer based unique id fields (such as uuids or unique string ids).

    A couple of notable Java libs:

    https://github.com/f4b6a3/ulid-creator

    https://github.com/f4b6a3/tsid-creator

    https://github.com/akhawaja/ksuid

  • tsid-creator

    A Java library for generating Time Sortable Identifiers (TSID).

    I started looking into TSID/KSUID/ULID in order to support cursor based pagination schemes in GraphQL against non-integer based unique id fields (such as uuids or unique string ids).

    A couple of notable Java libs:

    https://github.com/f4b6a3/ulid-creator

    https://github.com/f4b6a3/tsid-creator

    https://github.com/akhawaja/ksuid

  • ksuid

    Java implementation of K-Sortable Globally Unique IDs (by akhawaja)

    I started looking into TSID/KSUID/ULID in order to support cursor based pagination schemes in GraphQL against non-integer based unique id fields (such as uuids or unique string ids).

    A couple of notable Java libs:

    https://github.com/f4b6a3/ulid-creator

    https://github.com/f4b6a3/tsid-creator

    https://github.com/akhawaja/ksuid

  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • UUID

    A PHP library for generating universally unique identifiers (UUIDs). (by ramsey)

    There's also the risk of bad randomness sources and/or bugs.

    One popular UUID library got a bug report stating: "We are generating about 1M UUID4 a day, and we are getting several hundred collisions a day". And so they were; turned out to be a bug/weird interaction between the OpenSSL library they were using for randomness and forking. (Details here, although it was all fixed years ago of course: https://github.com/ramsey/uuid/issues/80)

    On paper, you should never, ever, ever see a collision when generating a mere million v4 UUIDs a day, much less hundreds of collisions. But that doesn't mean it can't happen!

    This is also an interesting bit of analysis; comes from a company that processed a lot of UUIDs generated in browsers, checked, and discovered about 5 collisions per million UUIDs. Again, not what you'd naively expect! (Turned out to be mostly driven by misbehaving crawlers.) https://medium.com/teads-engineering/generating-uuids-at-sca...

  • simpleflake

    Distributed ID generation in python for the lazy.

    I've used something very similar in the past, called SimpleFlake[0], which is essentially a 64 bit version with the same principles. I've used it in Lisp, C, C++, Clojure, Python, and Rust. It's conceptually simple, and fits in a 64bit int, which is natively available in a lot of databases.

    [0] SimpleFlake - https://github.com/SawdustSoftware/simpleflake/blob/f2b51f76...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts