Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Pomelo.EntityFrameworkCore.MySql
Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector
-
umbrella
⛱ Broadly scoped ecosystem & mono-repository of 190 TypeScript projects (and 155 examples) for general purpose, functional, data driven development
- How long the user took to write the post. This can happen if the app creates the ID when the user starts editing the post and also shares a timestamp of the publication or save time.
- Whether or not the user edited the post after posting it. This can happen if the posts's displayed time doesn't match the timestamp in the ID.
- Whether or not the user prepared the post in advance and set it to post automatically. If the timestamp is very close to a round numbered time like 21:00:00, it was likely posted automatically. If the posting platform does not provide such functionality, then the user must be using some third-party software or custom software to do it. This information can help de-anonymize the user.
----
[0] https://github.com/anthonynsimon/timeflake/issues/3
[1] https://firebase.google.com/docs/cloud-messaging/android/cli...
[2] https://www.eff.org/deeplinks/2017/03/five-creepy-things-you...
[3] https://digitalcontentnext.org/wp-content/uploads/2018/08/DC...
[4] https://www.eff.org/deeplinks/2016/08/windows-10-microsoft-b...
[5] https://www.eff.org/deeplinks/2020/11/macos-leaks-applicatio...
I personally use: https://github.com/tvondra/sequential-uuids
The time component resolution is configurable, and you can make it wrap around every so often, filling in gaps left by page splits, updates, deletes, etc.
There’s a spec called ULID that’s pretty much this with default base32 encoding
https://github.com/ulid/spec
I’ve also worked on a UUID-ULID bridge for Go
https://github.com/sudhirj/uulid.go
And seeing as this is just 128 bits it’s quite easy to move seamlessly between formats and representations.
I’ve found this concept especially useful in nosql stores like DynamoDB, where using a ULID primary key makes objects time sortable automatically. It’s also quite easy to query for items by zeroing out the random component and setting only the time stamp bytes.
This approach has become my preferred way of generating IDs for database rows. It is relatively space efficient and doesn't require a round trip to the database to generate an ID like auto increment does.
While working on a C# implementation for MySQL and we found that when the DB uses Little Endian Binary that the GUID must be reversed to store in order:
https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCo...
https://github.com/ulid/spec isn't timeflake, but is a good spec, and there are implementations in multiple languages. there are 2 listed for js.
https://github.com/aarondcohen/id128 and https://github.com/ulid/javascript
@thi.ng/ksuid https://github.com/thi-ng/umbrella/tree/develop/packages/ksu...
Related posts
- I modified and hacked away xonsh source code
- AI for Web Devs: Your First API Request to OpenAI
- Meta's new AI image generator was trained on 1.1B Instagram and FB photos
- GitHub - LykosAI/StabilityMatrix: Multi-Platform Package Manager for Stable Diffusion
- Coconut: Simple, elegant, Pythonic functional programming