Competitive Algorithms for Distributed Data Management