Design distributed transactions protocol | Google Interview Question