4 ms·
I started looking into TSID/KSUID/ULID in order to support cursor based pagination schemes in GraphQL against non-integer based unique id fields (such as uuids
by halfmatthalfcat 6y ago
I started looking into TSID/KSUID/ULID in order to support cursor based pagination schemes in GraphQL against non-integer based unique id fields (such as uuids or unique string ids).
A couple of notable Java libs:
https://github.com/f4b6a3/ulid-creator https://github.com/f4b6a3/ulid-creator
https://github.com/f4b6a3/tsid-creator https://github.com/f4b6a3/tsid-creator
https://github.com/akhawaja/ksuid https://github.com/akhawaja/ksuid
- cratermoon 6y agoPlease don't use the akhawaja ksuid generator for Java unchanged. We used it at my last job until we realized 1. the Base62 code is not thread-safe (it uses a static StringBuilder) and more importantly 2. The epoch used is different from the standard, so the generated ksuid aren't portable. Use https://github.com/ksuid/ksuid https://github.com/ksuid/ksuid insteads
- halfmatthalfcat 6y agoGood to know, thanks.