Cosmos: Causal Consistency on the Network Edge