A flexible algorithm for replicated directory management