denver at ossguy.com
Wed Feb 28 14:47:06 UTC 2018
On Wed, Feb 28, 2018 at 08:59:01AM +0000, Kevin Smith wrote:
> On 13 Feb 2018, at 16:57, Simon Friedberger <simon.jabber at a-oben.org> wrote:
> > E3. Simply make the ID: FROM-TIMESTAMP.
> > Here FROM needs to be the eventual FROM after possible
> > rewriting. Can
> > that be done?
> > And TIMESTAMP has to be strictly increasing so should have
> > sub-second
> > resolution.
> > I assume this is impossible because otherwise it would be to
> > easy. But
> > why is it impossible? :)
> Because timestamps aren’t monotonic? :)
Do you mean because most people use Unix time and/or other UTC-based timestamps (that have leap seconds)?
If so, this can be mostly solved by using TAI timestamps. Unfortunately, it is tricky in most OSes to obtain a TAI timestamp, but I found some code that does this (on many platforms anyway):
We've used this code for implementing usage tracking in JMP (to ensure a day's length doesn't vary from day to day - it is always exactly 86,400 seconds long). For details, see https://gitlab.com/ossguy/sgx-catapult/commit/31c2cb7c8fbea1ad4cc6753a4343dbfc65552fa5 . As you might suspect, we'd like to port the above TAI code to Ruby, but it works ok as-is for now.
I realize that clock skew could still cause the TAI timestamp that your OS returns to be non-monotonic (i.e. a machine issue, not an issue with TAI time itself); I'm not sure if that's a substantial issue for the message IDs being discussed here.
More information about the Standards