1

Consistency and Isolation for Python Programmers

 1 year ago
source link: https://emptysqua.re/blog/pycon-2023-consistency-isolation/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Captain Kirk from Star Trek the original series. He’s looking angrily at a computer, which is in the shape of a gray cylinder with a few lights, knobs, and antennae.

Computers are infuriating.

At PyCon 2023 I talked about consistency and isolation in databases, and showed Python implementations of four isolation levels. The subject goes a bit deeper than I could cover in 30 minutes; here are links for further reading.

First, orient yourself with Kyle “Aphyr” Kingsbury’s map.

Isolation

Basics

Granularity of Locks in a Shared Data Base, Gray et. al. 1975, or the summary in the Morning Paper part 1 and part 2. This is the earliest paper I’ve read about isolation. It’s fundamental.

A Critique of ANSI SQL Isolation Levels, Berenson et. al. 1995, or the Morning Paper summary.

Advanced

Generalized Isolation Level Definitions, Adya et. al. 2000, Morning Paper.

Optional: Seeing is Believing: A Client-Centric Specification of Database Isolation, Crooks et. al. 2017, Morning Paper.

Consistency

Linearizability

Linearizability: A Correctness Condition for Concurrent Objects, Herlihy & Wing 1990.

Linearizability versus Serializability on Peter Bailis’s blog.

Visualizing Linearizability, Michael Whittaker’s blog.

We often implement linearizability in a distributed system with a consensus algorithm such as Paxos or Raft.

Other consistency levels

Morning Paper: Distributed Consistency and Session Anomalies.

MongoDB’s “Read Concern” docs.

Categories: Python
Tags: pycon


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK