jvm:synchronized
Code layer: Lock
The advantage of LOCK: there are read locks and write locks
During the wait time, no response returns false, otherwise true
Read more and write less, hope to be faster than synchronized
Concurrency:
Synchronized, lock of simple program (single node)
Multi-node: Most of the row-level locks of the database are independent of a public resource, which is used as the only object for lock processing
Distributed processing