Author Topic: What is the difference between pessimistic and optimistic locking?  (Read 139 times)

Offline Jaiden

  • 1
  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
Hi, I'd like to ask you something, what is the difference between pessimistic and optimistic locking? Please inform me please Help.
« Last Edit: June 05, 2017, 05:15:05 PM by Sofyene »



Offline Aadam

  • 1
  • Newbie
  • *
  • Posts: 0
  • Karma: +0/-0
    • View Profile
Re: Pessimistic and optimistic locking
« Reply #1 on: June 05, 2017, 05:15:57 PM »
- In pessimistic locking, when a user opens a data to update it, a lock is granted. Other users can only view the data until the whole transaction of the data update is completed.

- In optimistic locking, a data is opened for updating by multiple users. A lock is granted only during the update transaction and not for the entire session. Due to this concurrency is increased and is a practical approach of updating the data.


 

Sitemap 1 2 3 4 5 6 7 8 9