Ariel Shaqed (Scolnicov)09/06/2022, 10:40 AM
we will use something like
. Now the files
will list in time-sorted order. So no need for KV, we can simply list these objects in S3. Unfortunately, it is still hard to go backwards in such a list. And that's actually the preferred mode: "find the last run_id from at least 2 weeks ago". So... I'd really like to name them
, where RANDOM_8601_ISH is an ISO 8601-like printable representation of timestamp that sorts in reverse order, and we include TS_ISO_8601 merely for readability. Now we just need an encoding 🙂 Where I've gotten so far: use a 9s-complement ASCII representation. An even less-readable representation would use e.g.
(right now would be
10000000000 - EPOCH
(== 10000000000-1662460547), and 5 seconds later it would be
. A more-readable representation might use
, and let you decode in your head with a little effort. Is there any more standard way to do this?