New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add optional time to squuid constructor #95
Comments
Care to provide a PR? It should be trivial On Sat, Jun 27, 2015 at 3:34 PM Thomas Deutsch notifications@github.com
|
I think this is not correct - damn, sorry. I am working on a new pull request. |
Decided to go with my own patch — yours has a bug, it was faster to fix it by myself: f2f05fa Note that only seconds, not milliseconds, go to squuid (so they fit into 32 bit). Also note that the purpose of squuid was to provide monotonic unique decentralized identities. The fact that they’re using time is just a coincidence. It would be reasonable not to rely on that, and store timestamp explicitly. I’m adding sqquid/1 mostly for the symmetry of the API. |
Thank you very mutch. Sorry about not getting it right. 2015-07-19 15:03 GMT+02:00 Nikita Prokopov notifications@github.com:
|
I would love to have the option to pass a optional timestamp to the squuid constructor.
one example scenario:
I store all entities in firebase. For every entity, the key is the squuid from datascript. The value is a transit-string.
If every squuid would contain the due-date of that item ( not the creation-time ) - the backend server will be able to detect all the items with that due-date without the need to transit every value. This would be perfect for many cron-jobs.
This is my Server-DB architecture:
The text was updated successfully, but these errors were encountered: