Causal memory: definitions, implementation, and programming