Fault tolerance in distributed systems