Recovery in
                    Mobile
                    Database
                    System




                    Presented by:
                                    PRAVEEN PALLAV
                                        (1DS09IS061)



ISE - DSCE - 2013                               1
RECOVERY IN MOBILE DATABASE SYSTEM




Outline
 Introduction
 Previouswork
 System model
 Recovery and its issue
 Proposed recovery scheme
 Advantages
 Disadvantages



ISE – DSCE – 2013                                         2
RECOVERY IN MOBILE DATABASE SYSTEM




Introduction
 Aim   to provide a scheme which will help
    a MU recover efficiently, taking reduced
    amount of time to recover from its last
    secure state

 This  new mobile computing environment
    poses challenging problems in designing
    fault-tolerant systems

ISE - DSCE – 2013                                             3
RECOVERY IN MOBILE DATABASE SYSTEM




 Motivation
     Telecommunication services need to improve the
      quality, availability, and reliability of cellular services.

     information accessing capability regardless of the location

     Motivated by such growing demand, we envision an
      information processing system

     Need of fault-tolerant systems which suit the mobile
      environment



ISE - DSCE – 2013                                                             4
RECOVERY IN MOBILE DATABASE SYSTEM




   Previous work
    Lazy           schemes

    Pessimistic        scheme

    Schemes           based on the MU’s movement
           Distance based

           Frequency based


ISE - DSCE – 2013                                                     5
RECOVERY IN MOBILE DATABASE SYSTEM




System model




ISE - DSCE – 2013                                        6
RECOVERY IN MOBILE DATABASE SYSTEM




  Problem Specifications
  Location            is not fixed
  Batteries           have limited power
  Different           types of failures
        Hard failure
        Soft failure

  Weak             wireless link
ISE - DSCE – 2013                                                          7
RECOVERY IN MOBILE DATABASE SYSTEM




Recovery
A   mechanism to restore an intermediate
   consistent state of the system.

 made          possible by maintaining log

 log     management should be very efficient



ISE - DSCE – 2013                                                    8
RECOVERY IN MOBILE DATABASE SYSTEM




 …….
   Appropriate            recovery strategy needs to
      be chosen
   Failure         rate

   Memory           constraints

   Recovery           time

   Communication             / Mobility Ratio

ISE - DSCE – 2013                                                        9
RECOVERY IN MOBILE DATABASE SYSTEM




   Recovering the MU state on its failure
    at the time of handoff




ISE - DSCE – 2013                                            10
RECOVERY IN MOBILE DATABASE SYSTEM




 Key terms
   Region:  BSs under the same MSC.
   Designated BS: First BS for a MU registration
    inside a region.
                          MSC



                    BS1              BS3
                          BS2
                          DBS


ISE - DSCE – 2013                                               11
RECOVERY IN MOBILE DATABASE SYSTEM




  ………
    Characteristics     of DBS:
          Store all the log entry done by respective
           MU.
          Different DBS for different region.




ISE - DSCE – 2013                                                     12
RECOVERY IN MOBILE DATABASE SYSTEM




  Inter-region
      Step 1: MU registers with a BS in a Region, changes
       state of that BS as DBS for that MU.
      Step 2: MU does some transactions, stores the log
       at respective DBS.
      Step 3: MU goes out of that region and comes
       under another region and repeats the same
       registration procedure, making first registered BS as
       DBS for that region.
      Step 4: Current DBS calls for the logs from the
       previous region DBS.
      Step 5: Previous DBS transfers all the respective MU
       log to the new DBS.

ISE - DSCE – 2013                                                      13
RECOVERY IN MOBILE DATABASE SYSTEM




   Inter-region
                    MSC                              MSC



    BS1                   BS3             BS1                    BS3
                    DBS
                    BS2                              DBS
                                                     BS2
                                LOG




ISE - DSCE – 2013                                                          14
RECOVERY IN MOBILE DATABASE SYSTEM




    Intra-region
      Log          transfer from MU cache to BS:
            When?
              EitherMU memory is exhausted.
              Or a handoff is detected.

            How?
              Log    is updated to the current BS.
              It is appended to the DBS log.




ISE - DSCE – 2013                                                           15
RECOVERY IN MOBILE DATABASE SYSTEM




    Log management
      Registration:
            Connect(MHID, PBSID, DBSID)
                       MHID: ID of the MU.
                       PBSID: Previous BS’s ID.
                       DBSID: ID of respective region’s DBS.




ISE - DSCE – 2013                                                                    16
RECOVERY IN MOBILE DATABASE SYSTEM




   Case 1 log management
       Step 1: MU registers with a BS in a Region, changes
        state of that BS as DBS for that MU.
       Step 2: MU does some transactions, stores the log at
        respective DBS.
       Step 3: MU goes out of DBS vicinity and comes under
        BS2 cell.
       Step 4: MU registers itself to new BS with
        connect(MHID, PBSID, DBSID).
       Step 5: BS2 sends a message to PBSID ‘MHID is with
        me’.
       Step 6: Since the PBS is also the DBS for that
        MU, hence no action taken and the message is
        discarded.
ISE - DSCE – 2013                                                       17
RECOVERY IN MOBILE DATABASE SYSTEM




 Case 1 log management
                              MSC




                    DBS
                    BS1                          BS3
                          MHID is with me
                              BS2

                                    Connect(MHID, PBSID, DBSID)



ISE - DSCE – 2013                                                           18
RECOVERY IN MOBILE DATABASE SYSTEM




  Case 2 log management
   Going on in addition with previous scenario:
    Step 1: Now MU has moved from BS2 to BS3,
     repeats the same registration process as in
     previous case and the PBS (BS2) is notified by
     the current BS (BS3) about that MU existence.
    Step 2: Now BS2 checks for the PBS for that
     MU in its memory, since the PBS is the DBS
     hence no delete message or action required.


ISE - DSCE – 2013                                                 19
RECOVERY IN MOBILE DATABASE SYSTEM




   Case 2 log management
                                  MSC


                                               MHID is with me

                    DBS
                    BS1                             BS3

                     Since previous BS is DBS, hence no
                                   BS2
                          delete message is send           Connect(MHID, PBSID, DBSID)




ISE - DSCE – 2013                                                              20
RECOVERY IN MOBILE DATABASE SYSTEM




   Case 3 log management
    In addition with previous scenario:
     Step 1: MU goes from BS3 to BS4 now and performs
       the same registration process with BS4, BS4 notifies
       BS3 about MU.
     Step 2: The with respect to that MU, PBSID stored at
       BS3 is not the DBS hence a ‘delete’ message from
       BS3 is sent to BS2.
     Step 3: BS2 on receiving of ‘delete’ message transfers
       all log for that MU to the respective DBS.
     Step 4: DBS acknowledges BS2 about log successful
       transfer.
     Step 5: BS2 deletes respective MU’s log entry from its
       memory.
ISE - DSCE – 2013                                                      21
RECOVERY IN MOBILE DATABASE SYSTEM




       Case 3 log management
                                    MSC



                                                   MHID is with me
                                                          BS4
     DBS
Acknowledgement
                                      Delete        Connect(MHID, PBSID, DBSID)
                                          BS3

                        BS2
                Delete LOGS entry
                       the log

  ISE - DSCE – 2013                                                        22
RECOVERY IN MOBILE DATABASE SYSTEM




  Case 4 log management
   When we further move on in this scenario:
    Step 1: MU comes back to the recent visited BS
     forming a loop i.e. from BS4 to BS3, registration
     process is done in the same previous manner.
    Step 2: BS4 checks whether the PBS and current BS
     of that MU in its memory are same? If yes, send the
     respective MU’s log to current BS i.e. logs are
     transferred from BS4 to BS3.
    Step 3: BS3 appends the BS4 log with its current
     available log and BS3 deletes the PBSID for that MU
     from its memory.

ISE - DSCE – 2013                                                   23
RECOVERY IN MOBILE DATABASE SYSTEM




    Case 4 log management
                             MSC




                                                    PBSID==
                                                     BS4
    DBS                                             LOGS?
                                                    CBSID
                             MHID is with me
                          Append with previous
                                   BS3
                          Log & delete the PBSID.

                          Connect(MHID, PBSID, DBSID)
                    BS2


ISE - DSCE – 2013                                                      24
RECOVERY IN MOBILE DATABASE SYSTEM




    Recovery case 1
      Recovery       in same BS where it crashed:
            Uses log saved in current BS.
            If not sufficient go for previous BS.
            If that is also insufficient, go for MU’s DBS.
            By using DBS log MU is restored with
             required previous state.




ISE - DSCE – 2013                                                         25
RECOVERY IN MOBILE DATABASE SYSTEM




  Recovery case 2
    Recovery        in BS other than in which failed:
           Current BS unaware of handoff.
           PBSID is unavailable.
           Old BS in which MU failed notifies respective
            DBS about MU failure.
           When MU tries to recover, current BS queries
            DBS for log.
           Using DBS log MU is recovered.

ISE - DSCE – 2013                                                      26
RECOVERY IN MOBILE DATABASE SYSTEM




    Advantages
      Preceding   BS log maintenance gives
       latest recovery option.
      Unification at DBS avoids redundancy of
       logs.
      Loop is tackled.
      Auto unification of logs at one site helps:
            Quick recovery.
            Achieve real time system deadlines.

ISE - DSCE – 2013                                                      27
RECOVERY IN MOBILE DATABASE SYSTEM




   Disadvantage
     DBS with many MUs gets overburdened.
     Single point of failure.




ISE - DSCE – 2013                                             28
RECOVERY IN MOBILE DATABASE SYSTEM




ISE - DSCE – 2013                                        29

Recovery in database system new

  • 1.
    Recovery in Mobile Database System Presented by: PRAVEEN PALLAV (1DS09IS061) ISE - DSCE - 2013 1
  • 2.
    RECOVERY IN MOBILEDATABASE SYSTEM Outline  Introduction  Previouswork  System model  Recovery and its issue  Proposed recovery scheme  Advantages  Disadvantages ISE – DSCE – 2013 2
  • 3.
    RECOVERY IN MOBILEDATABASE SYSTEM Introduction  Aim to provide a scheme which will help a MU recover efficiently, taking reduced amount of time to recover from its last secure state  This new mobile computing environment poses challenging problems in designing fault-tolerant systems ISE - DSCE – 2013 3
  • 4.
    RECOVERY IN MOBILEDATABASE SYSTEM Motivation  Telecommunication services need to improve the quality, availability, and reliability of cellular services.  information accessing capability regardless of the location  Motivated by such growing demand, we envision an information processing system  Need of fault-tolerant systems which suit the mobile environment ISE - DSCE – 2013 4
  • 5.
    RECOVERY IN MOBILEDATABASE SYSTEM Previous work  Lazy schemes  Pessimistic scheme  Schemes based on the MU’s movement  Distance based  Frequency based ISE - DSCE – 2013 5
  • 6.
    RECOVERY IN MOBILEDATABASE SYSTEM System model ISE - DSCE – 2013 6
  • 7.
    RECOVERY IN MOBILEDATABASE SYSTEM Problem Specifications  Location is not fixed  Batteries have limited power  Different types of failures  Hard failure  Soft failure  Weak wireless link ISE - DSCE – 2013 7
  • 8.
    RECOVERY IN MOBILEDATABASE SYSTEM Recovery A mechanism to restore an intermediate consistent state of the system.  made possible by maintaining log  log management should be very efficient ISE - DSCE – 2013 8
  • 9.
    RECOVERY IN MOBILEDATABASE SYSTEM …….  Appropriate recovery strategy needs to be chosen  Failure rate  Memory constraints  Recovery time  Communication / Mobility Ratio ISE - DSCE – 2013 9
  • 10.
    RECOVERY IN MOBILEDATABASE SYSTEM  Recovering the MU state on its failure at the time of handoff ISE - DSCE – 2013 10
  • 11.
    RECOVERY IN MOBILEDATABASE SYSTEM Key terms  Region: BSs under the same MSC.  Designated BS: First BS for a MU registration inside a region. MSC BS1 BS3 BS2 DBS ISE - DSCE – 2013 11
  • 12.
    RECOVERY IN MOBILEDATABASE SYSTEM ………  Characteristics of DBS:  Store all the log entry done by respective MU.  Different DBS for different region. ISE - DSCE – 2013 12
  • 13.
    RECOVERY IN MOBILEDATABASE SYSTEM Inter-region  Step 1: MU registers with a BS in a Region, changes state of that BS as DBS for that MU.  Step 2: MU does some transactions, stores the log at respective DBS.  Step 3: MU goes out of that region and comes under another region and repeats the same registration procedure, making first registered BS as DBS for that region.  Step 4: Current DBS calls for the logs from the previous region DBS.  Step 5: Previous DBS transfers all the respective MU log to the new DBS. ISE - DSCE – 2013 13
  • 14.
    RECOVERY IN MOBILEDATABASE SYSTEM Inter-region MSC MSC BS1 BS3 BS1 BS3 DBS BS2 DBS BS2 LOG ISE - DSCE – 2013 14
  • 15.
    RECOVERY IN MOBILEDATABASE SYSTEM Intra-region  Log transfer from MU cache to BS:  When?  EitherMU memory is exhausted.  Or a handoff is detected.  How?  Log is updated to the current BS.  It is appended to the DBS log. ISE - DSCE – 2013 15
  • 16.
    RECOVERY IN MOBILEDATABASE SYSTEM Log management  Registration:  Connect(MHID, PBSID, DBSID)  MHID: ID of the MU.  PBSID: Previous BS’s ID.  DBSID: ID of respective region’s DBS. ISE - DSCE – 2013 16
  • 17.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 1 log management  Step 1: MU registers with a BS in a Region, changes state of that BS as DBS for that MU.  Step 2: MU does some transactions, stores the log at respective DBS.  Step 3: MU goes out of DBS vicinity and comes under BS2 cell.  Step 4: MU registers itself to new BS with connect(MHID, PBSID, DBSID).  Step 5: BS2 sends a message to PBSID ‘MHID is with me’.  Step 6: Since the PBS is also the DBS for that MU, hence no action taken and the message is discarded. ISE - DSCE – 2013 17
  • 18.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 1 log management MSC DBS BS1 BS3 MHID is with me BS2 Connect(MHID, PBSID, DBSID) ISE - DSCE – 2013 18
  • 19.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 2 log management Going on in addition with previous scenario:  Step 1: Now MU has moved from BS2 to BS3, repeats the same registration process as in previous case and the PBS (BS2) is notified by the current BS (BS3) about that MU existence.  Step 2: Now BS2 checks for the PBS for that MU in its memory, since the PBS is the DBS hence no delete message or action required. ISE - DSCE – 2013 19
  • 20.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 2 log management MSC MHID is with me DBS BS1 BS3 Since previous BS is DBS, hence no BS2 delete message is send Connect(MHID, PBSID, DBSID) ISE - DSCE – 2013 20
  • 21.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 3 log management In addition with previous scenario:  Step 1: MU goes from BS3 to BS4 now and performs the same registration process with BS4, BS4 notifies BS3 about MU.  Step 2: The with respect to that MU, PBSID stored at BS3 is not the DBS hence a ‘delete’ message from BS3 is sent to BS2.  Step 3: BS2 on receiving of ‘delete’ message transfers all log for that MU to the respective DBS.  Step 4: DBS acknowledges BS2 about log successful transfer.  Step 5: BS2 deletes respective MU’s log entry from its memory. ISE - DSCE – 2013 21
  • 22.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 3 log management MSC MHID is with me BS4 DBS Acknowledgement Delete Connect(MHID, PBSID, DBSID) BS3 BS2 Delete LOGS entry the log ISE - DSCE – 2013 22
  • 23.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 4 log management When we further move on in this scenario:  Step 1: MU comes back to the recent visited BS forming a loop i.e. from BS4 to BS3, registration process is done in the same previous manner.  Step 2: BS4 checks whether the PBS and current BS of that MU in its memory are same? If yes, send the respective MU’s log to current BS i.e. logs are transferred from BS4 to BS3.  Step 3: BS3 appends the BS4 log with its current available log and BS3 deletes the PBSID for that MU from its memory. ISE - DSCE – 2013 23
  • 24.
    RECOVERY IN MOBILEDATABASE SYSTEM Case 4 log management MSC PBSID== BS4 DBS LOGS? CBSID MHID is with me Append with previous BS3 Log & delete the PBSID. Connect(MHID, PBSID, DBSID) BS2 ISE - DSCE – 2013 24
  • 25.
    RECOVERY IN MOBILEDATABASE SYSTEM Recovery case 1  Recovery in same BS where it crashed:  Uses log saved in current BS.  If not sufficient go for previous BS.  If that is also insufficient, go for MU’s DBS.  By using DBS log MU is restored with required previous state. ISE - DSCE – 2013 25
  • 26.
    RECOVERY IN MOBILEDATABASE SYSTEM Recovery case 2  Recovery in BS other than in which failed:  Current BS unaware of handoff.  PBSID is unavailable.  Old BS in which MU failed notifies respective DBS about MU failure.  When MU tries to recover, current BS queries DBS for log.  Using DBS log MU is recovered. ISE - DSCE – 2013 26
  • 27.
    RECOVERY IN MOBILEDATABASE SYSTEM Advantages  Preceding BS log maintenance gives latest recovery option.  Unification at DBS avoids redundancy of logs.  Loop is tackled.  Auto unification of logs at one site helps:  Quick recovery.  Achieve real time system deadlines. ISE - DSCE – 2013 27
  • 28.
    RECOVERY IN MOBILEDATABASE SYSTEM Disadvantage  DBS with many MUs gets overburdened.  Single point of failure. ISE - DSCE – 2013 28
  • 29.
    RECOVERY IN MOBILEDATABASE SYSTEM ISE - DSCE – 2013 29