Mthology

Mthology

Simpleflake

Simpleflake: Distributed Id-Generation for the Lazy

Our library, simpleflake, follows a similar pattern to Snowflake in that it is prefixed with a millisecond timestamp, but the remaining bits are completely random.

Random UUIDs are, well, random, so your data is scattered all across the btree (which is arguably the most common method of storage). If your access pattern is completely random, you probably won’t see a performance loss but usually this is not the case. For example. when you’re grabbing the freshest 100 rows for a user, having all required data in a few contiguous pages does wonders for reads.

Advertisement

Share This Story