Timeflake: 128-bit, roughly-ordered, URL-safe UUIDs

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • timeflake

    Timeflake is a 128-bit, roughly-ordered, URL-safe UUID.

  • - How long the user took to write the post. This can happen if the app creates the ID when the user starts editing the post and also shares a timestamp of the publication or save time.

    - Whether or not the user edited the post after posting it. This can happen if the posts's displayed time doesn't match the timestamp in the ID.

    - Whether or not the user prepared the post in advance and set it to post automatically. If the timestamp is very close to a round numbered time like 21:00:00, it was likely posted automatically. If the posting platform does not provide such functionality, then the user must be using some third-party software or custom software to do it. This information can help de-anonymize the user.

    ----

    [0] https://github.com/anthonynsimon/timeflake/issues/3

    [1] https://firebase.google.com/docs/cloud-messaging/android/cli...

    [2] https://www.eff.org/deeplinks/2017/03/five-creepy-things-you...

    [3] https://digitalcontentnext.org/wp-content/uploads/2018/08/DC...

    [4] https://www.eff.org/deeplinks/2016/08/windows-10-microsoft-b...

    [5] https://www.eff.org/deeplinks/2020/11/macos-leaks-applicatio...

  • sequential-uuids

    generator of sequential UUIDs

  • I personally use: https://github.com/tvondra/sequential-uuids

    The time component resolution is configurable, and you can make it wrap around every so often, filling in gaps left by page splits, updates, deletes, etc.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • uulid.go

    ULID-UUID compatibility library for generating and parsing ULIDs.

  • There’s a spec called ULID that’s pretty much this with default base32 encoding

    https://github.com/ulid/spec

    I’ve also worked on a UUID-ULID bridge for Go

    https://github.com/sudhirj/uulid.go

    And seeing as this is just 128 bits it’s quite easy to move seamlessly between formats and representations.

    I’ve found this concept especially useful in nosql stores like DynamoDB, where using a ULID primary key makes objects time sortable automatically. It’s also quite easy to query for items by zeroing out the random component and setting only the time stamp bytes.

  • Pomelo.EntityFrameworkCore.MySql

    Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector

  • This approach has become my preferred way of generating IDs for database rows. It is relatively space efficient and doesn't require a round trip to the database to generate an ID like auto increment does.

    While working on a C# implementation for MySQL and we found that when the DB uses Little Endian Binary that the GUID must be reversed to store in order:

    https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCo...

  • id128

    128-bit id generation in multiple formats

  • https://github.com/ulid/spec isn't timeflake, but is a good spec, and there are implementations in multiple languages. there are 2 listed for js.

    https://github.com/aarondcohen/id128 and https://github.com/ulid/javascript

  • umbrella

    ⛱ Broadly scoped ecosystem & mono-repository of 190 TypeScript projects (and 155 examples) for general purpose, functional, data driven development

  • @thi.ng/ksuid https://github.com/thi-ng/umbrella/tree/develop/packages/ksu...

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