DISTRIBUTED SYSTEM
CHAPTER 10 : CASE STUDY
LAB WORK SOLUTION- DISTRIBUTED SYSTEM
DISTRIBUTED SYSTEM -BCA -ALL SLIDES
MCQ- DISTRIBUTED SYSTEM

RECOVERY AND RECOVERY TECHNIQUES 

Recovery

Recovery in distributed systems is crucial for maintaining data integrity and system availability after failures. This involves detecting failures, restoring the system to a consistent state, and resuming normal operations. Effective recovery strategies are essential to handle various types of failures, including hardware crashes, software bugs, and network issues.

Recovery Techniques

  1. Logging:

    • Write-Ahead Logging (WAL): Recording changes to a log before applying them to the database. This helps in restoring the system to the last consistent state.
    • Redo Logs and Undo Logs: Redo logs help in reapplying committed transactions, while undo logs help in rolling back uncommitted transactions.
  2. Checkpointing:

    • Periodically saving the state of the system to stable storage. In the event of a failure, the system can be restored to the last checkpoint.
  3. Replication:

    • Maintaining copies of data across multiple nodes. This ensures data availability even if some nodes fail.

TYPES OF RECOVERY

Forward Recovery

Forward recovery, also known as roll-forward recovery, involves moving the system forward to a new consistent state after a failure. This is typically achieved by applying the necessary operations to transition the system from its current, possibly inconsistent state to a consistent one.

Example of Forward Recovery

  • Database Systems:
    • After a crash, a database system may use redo logs to reapply committed transactions that were not written to the main database storage before the crash.

Backward Recovery

Backward recovery, also known as roll-back recovery, involves returning the system to a previous consistent state before the failure occurred. This approach typically undoes changes made during the failure period to eliminate inconsistencies.

Example of Backward Recovery

  • Database Systems:
    • After a transaction failure, a database system may use undo logs to roll back changes made by the transaction.