We should rethink where we generate absolute timestamps for time based operations (e.g. sleeps, delayed calls). At the moment, the SDK generates a journal entry with an absolute timestamp when the operation should be executed. An alternative could be to store the relative duration and let the runtime convert it into an absolute timestamp when receiving the command from the service endpoint.
Generating the absolute timestamp on the runtime
Pros:
Being less affected by clock skews from the machine on which the services are running
Within each Raft group, the peers could agree on the current time (guaranteeing monotonically increasing time)
Cons:
Buffering of commands (e.g. on the service endpoint) will cause an additional delay for time based operations
We should rethink where we generate absolute timestamps for time based operations (e.g. sleeps, delayed calls). At the moment, the SDK generates a journal entry with an absolute timestamp when the operation should be executed. An alternative could be to store the relative duration and let the runtime convert it into an absolute timestamp when receiving the command from the service endpoint.
Generating the absolute timestamp on the runtime
Pros:
Cons: