Skip to main content

Preview: Client-side Transaction Handling With CockroachDB

A hands-on introduction to running an application backed by a database with serializable isolation. Currently in preview.

  • Course Number

    client-side-txn-handling
  • Self-Paced

  • Estimated Effort

    2 hours/week

About This Course (in preview)

This Preview course is about why application logic needs to be ready to work with serializable isolation, and what it needs, for developers who haven't worked with it before.

In this course, we'll focus on the questions:

  • How does lerializable isolation compare to read committed isolation (a common default for databases like PostgreSQL)?
  • What workflows would be treated differently by serializable isolation vs. read committed?
  • How is serializable isolation enforced at the database level?
  • What does an application working with serializable isolation need?

Examples are in Java.

Suggested prerequisites

It would be helpful to be familiar with the following:

  • Working with at least one programming language (particularly Java).
  • General familiarity with SQL and connecting with a SQL shell.

Detailed course outline

  • Chapter 1: Transactions and Isolation
    • Lesson - Why transaction handling is important
    • Lesson - Not all transactions are ACID: isolation anomalies
    • Exercise - Triggering an isolation anomaly with read committed isolation
    • Exercise - Avoiding an anomaly with serializable isolation
  • Chapter 2: Thinking About Contention
    • Lesson - Contention in the database
    • Lesson - Examples of contention
    • Exercise - Triggering a retry error with serializable isolation
  • Region and Zone Resilience
    • Video: Adding Cluster Regions
    • Exercise 02: Part 1: Create a multi-region database
    • Video: Non-Voting Replicas
    • Video: Zone Survival Goal
    • Exercise 02: Part 2: Create a multi-region database
    • Video: Exercise 02 Recap
    • Video: Setting a Region Survival Goal
    • Exercise 03: Setting a Region Survival Goal
    • Video: Exercise 03 Recap: Setting a Region Survival Goal
    • Quiz: Resilient Multi-Region Database

Course Staff

Will Cross
Will Cross, Ph.D.
Staff Curriculum Developer @ Cockroach Labs

Will is a huge fan of distributed databases and their architectures, and has been with Cockroach Labs for four years. In prior careers, he has been an experimental physicist and a high school teacher.

Frequently Asked Questions

What web browser should I use?

The Open edX platform works best with current versions of Chrome, Edge, Firefox, Internet Explorer, or Safari.

See our list of supported browsers for the most up-to-date information.

Enroll