Achieving Data Consistency in Distributed Systems