Checkpointing and recovery in distributed systems with and without loosely synchronized clocks using object oriented paradigm