CosId
CosId is a universal, flexible, high-performance distributed ID generator for Java. It provides multiple ID generation strategies to meet different use cases. CosIdGenerator delivers single-machine performance of approximately 15.5 million operations per second with globally increasing trend-based time. SnowflakeId addresses machine number allocation and clock backwards issues traditionally associated with Snowflake implementations. SegmentId operates by retrieving ID segments to reduce network IO overhead and supports distributors backed by Redis, JDBC-compatible relational databases, Zookeeper, and MongoDB. SegmentChainId is a lock-free enhancement of SegmentId that uses prefetch workers to maintain safe distance, achieving AtomicLong-level performance exceeding 127 million operations per second. The library supports Spring Boot 2.x, 3.x, and 4.x across Java 8 and Java 17 environments. CosId is suitable for distributed systems requiring unique identifier generation at scale, including microservices, databas