Algorithm used to determine order of events in a distributed system