flake
Languages and libraries
id generation library
SHOW HN2014
53points
15comments
#605of 2,272 in 2014
Top 27%of 2014 by points
How HN took it
DebatedReal support and real criticism
2 positive, 2 neutral or asking, 0 mixed, 3 critical, out of 7 comments about the project. Thread score -0.25.
Execution: 0 for, 3 againstIdea: 2 for, 0 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
Useful decentralized ID approach with no central server
From 2 comments
Very nice. This is based on Boundary's Erlang Flake ID service, more details of which are at…
dantiberian on HNThat's one reason you'd want this. A few others that I can think of: * No single point of failure if the id server goes down * Avoiding network round trip latency * You have…
dantiberian on HN
Objections
Clock drift or backwards clock can break k-ordering
From 3 comments
What happens if your system clock goes backwards? I think that NTP will not do this by default, but I wonder if it happens for other reasons.
dtauzell on HNLots of bad things happen if your clock goes backwards, which is why NTP doesn't do this. Depending on what your system is doing, setting the clock backwards can have serious…
michaelmior on HNVery nice. This is based on Boundary's Erlang Flake ID service, more details of which are at…
dantiberian on HN
MAC addresses are not always unique, so machine uniqueness is not guaranteed
From 2 comments
"So this allows for 2^16-1 unique IDs per millisecond per machine." Technically thats per MAC not per machine. I've run into multiple NICs with duplicate MACs as has everyone…
VLM on HNNobody else responded? Its not supposed to happen and yet it does. Not often. And yes it really confuses ARP.
VLM on HN
Questions
What happens when the system clock goes backwards?
From 1 comment
What happens if your system clock goes backwards? I think that NTP will not do this by default, but I wonder if it happens for other reasons.
dtauzell on HN
Alternatives named
Twitter Snowflake
From 2 comments
Neat! I made one of these in Java a while back after reading the snowflake Twitter post (which has since been removed). Looks like Twitter has retired Snowflake:…
mumrah on HNSnowflake was 63 bits due to some cleverness with resetting the epoch and coordinating unique worker ID's through Zookeeper. These Flakes relax those restrictions and are 128…
dantiberian on HN
Simpleflake (64-bit)
From 1 comment
Simpleflake is a 64 bit alternative http://engineering.custommade.com/simpleflake-distributed-id-generation-for-the-lazy/
espeed on HN
UUIDs
From 2 comments
Another alternative is using local UUIDs, right ? If you're just interested in generating a unique ID to shard and insert into one of your DB nodes.
swah on HNUUIDs also don't generally havea notion of ordering.
michaelmior on HN