A SnowflakeID is a unique, distributed identifier generated by the Twitter Snowflake algorithm, primarily used for ensuring unique IDs across a distributed system with high performance. It is best used for generating globally unique IDs in distributed databases, microservices architectures, and other systems where unique and scalable identification is essential.
This a ColdFusion based SnowflakeID generator, this was only built/tested with Lucee.
snowflake = new snowflake().init(nodeId=1000);
mySnowflakeId = snowflake.nextId();
writedump(mySnowflakeId);
If you have any feedback, reach out on CFML Slack:
Contributions are always welcome!
Here you can learn more about Snowflake ID:
https://en.wikipedia.org/wiki/Snowflake_ID
Also you can pull the timestamp from a working Snowflake ID here: