Timeflake

Dev tools

id generation library

SHOW HN2021

205points
137comments
#220of 2,533 in 2021
Top 9%of 2021 by points

How HN took it

CuriousMostly questions and neutral comments

4 positive, 26 neutral or asking, 1 mixed, 13 critical, out of 44 comments about the project. Thread score -0.18.

Idea: 3 for, 6 againstPrivacy: 0 for, 3 againstDesign: 0 for, 2 againstPerformance: 0 for, 1 againstExecution: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Ordered IDs help database index performance

    From 2 comments
    • 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…
      caleblloyd on HN
    • Query : For people who recommend UUIDs as a unique identifier in a distributed sytem, does the above satisfy the need? In the SO answer[0] uuid v4 is being recommended but that…
      abhishekjha on HN

Objections

  • Timestamps in IDs leak creation time, a privacy concern

    From 2 comments
    • This isn't strictly speaking a UUID. It's just a 128-bit identifier. It's "compatible with UUID" only in the sense that both are 128 bits wide, but this scheme doesn't have the…
      sltkr on HN
    • I filed an issue on the project, "Point out the privacy risks of timestamps in object IDs" [0]. ---- Non-random object IDs have privacy issues. Developers need to learn about…
      mleonhard on HN
  • Not a valid UUID despite claiming compatibility

    From 2 comments
    • This isn't strictly speaking a UUID. It's just a 128-bit identifier. It's "compatible with UUID" only in the sense that both are 128 bits wide, but this scheme doesn't have the…
      sltkr on HN
    • I'd worry a bit about the chance of collisions. They correctly state you can generate 50 million of them per millisecond with only a one in a billion chance of a collision (per…
      Ellipsis753 on HN
  • Collision risk is high at the stated generation rate

    From 1 comment
    • I'd worry a bit about the chance of collisions. They correctly state you can generate 50 million of them per millisecond with only a one in a billion chance of a collision (per…
      Ellipsis753 on HN

Requests

  • Add a privacy section to the readme

    From 1 comment
    • I filed an issue on the project, "Point out the privacy risks of timestamps in object IDs" [0]. ---- Non-random object IDs have privacy issues. Developers need to learn about…
      mleonhard on HN
  • Provide a NodeJS version

    From 1 comment

Questions

  • How does it compare to ULID, Snowflake and KSUID

    From 3 comments
    • Just to see the big picture, what are the main differences between this and Snowflake, or ULID (https://github.com/ulid/spec)?
      josephernest on HN
    • 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…
      sudhirj on HN
    • not quite sure why the requirement of being compatible with the UUID 128-bit representation. i personally try to use KSUID (160bit) when possible and can’t see any downside so far
      hankchinaski on HN

Alternatives named

  • ULID

    From 1 comment
    • 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…
      sudhirj on HN
  • KSUID

    From 1 comment
    • not quite sure why the requirement of being compatible with the UUID 128-bit representation. i personally try to use KSUID (160bit) when possible and can’t see any downside so far
      hankchinaski on HN
  • Datomic squuid

    From 1 comment
    • Datomic uses a similar approach by default. They called it squuid: https://docs.datomic.com/on-prem/identity.html#squuids
      m45t3r on HN
  • MongoDB ObjectId

    From 1 comment
    • How does this compare to Mongodbs ObjectId? They have roughly the same structure of timestamp+random but an additional incrementing counter-field at the end, sec-resolution…
      Too on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/25870482)