A Framework for Reconfiguration-Based Fault-Tolerance in Distributed Systems