HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
SawdustSoftware
simpleflake
Python2013–2021
SawdustSoftware / simpleflake

simpleflake

Distributed ID generation in python for the lazy.

3Distinct people
3Mentions
0Explicit recommenders
178GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Distributed ID generation in python for the lazy.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:24:10 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year3 dated mentions

Observed mentions: 2013-08-12 14:26:18 UTC to 2021-05-04 05:50:07 UTC.

0122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC211
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC000
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

3 sources
Hey, this is pretty insightful and not insulting at all - I always love hearing about the experiences of others. The RNG being used is not the random.random() Mersenne Twister one, it's the OS-provided cryptographically secure one: https://github.com/SawdustSoftware/simpleflake/blob/master/s... But in any case, the reason you need NTPd sync is not to seed the RNG, but because the IDs themselves are prefixed with millisecond timestamps. This is to ensure that you're not using the same sub-keyspace for that millisecond over and over again from multiple processes. If you're seeing that many collisions, obviously, it's time to change methods like you mention. Data being dropped out of existence sounds like an application code issue, and not an inherent problem with your IDing scheme. That sounds like a place where ops should get a big honking
Read the rest
error message ("tried to insert twice, collided both times"). In any case, the contingency plan for that for us is to just switch to snowflake, since with this specific scheme it should take a while before we hit that barrier, as calculated in the article. Adding more metadata is definitely an option, but I'm not a fan of it since data schemas (and data itself) have a nasty habit of changing over time, meaning you have to change your IDing scheme. Completely surrogate IDs don't have this issue.
In Simpleflake - Distributed ID generation for the lazy

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.