Implementation of Chandy–Lamport snapshot algorithm for recording a consistent global state of an asynchronous distributed system