Settings

Theme

Show HN: SnowId – A Decentralized, K-Ordered, 128-bit UUID library in C

github.com

15 points by beyonddream 3 years ago · 6 comments · 1 min read

Reader

Sharing my project inspired by twitter snowflake UUID generator but that supports:

1) Longer range of id's to be generated.

2) No coordination with other machines in the distributed system.

lijogdfljk 3 years ago

Possibly a tangent, but what is the "dot notation" described in:

    # hexadecimal representation of 128-bit id's in dot notation
    0:0:1:84:40:9b:ff:a5:2:0:12:ac:42:3:0:0
  • beyonddreamOP 3 years ago

    Good eye! That was a typo. It should read as "colon notation". It is just a visual representation of 128 bits (16 bytes) with each byte separated by colon ":". I have updated the readme with an example. One place where you will see this notation visually is MAC addresses.

orf 3 years ago

Why use this over the new ordered UUID RFC?

  • beyonddreamOP 3 years ago

    UUID RFC use <timestamp, sequence, node id> layout which is different from the layout of snowid scheme which is <timestamp, node id, sequence>. Also UUID RFC timestamp can only use up-to 60 bits whereas snowid has the full 64 bits to spare. They server different use-cases.

__ryan__ 3 years ago

Show an example of the generated id.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection