PEAA_学习笔记_Concurrency

Two issuses about concurrency that’re difficult to handle: 

   1. offline concurrency(transcations among several databases or serveral requests)

   2. multi-thread concurrency in application server side

Two basic ways of controlling concurrency

   1. isolation

   2. to make some data immutable

Optimistic Lock: detect conflictions and then solve them。 The lock is only held during the commit

Pessimistic Lock:  prevent conflictions

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.