Sagas in Erlang: Distributed Transactions Without Locks

Mark Allen
Distributed systems dilettante

Sagas are a technique described in a 1987 paper by Hector Garcia-Molina in the context of long-lived database transactions. Sagas provide a transactional abstraction across arbitrarily distributed services: either all of the operations in a Saga succeed or the operations are unwound back to the prior state. The idea never caught on in the world of databases, but 30 years later it is worth re-evaluating this idea when we need to provide transactional state changes across a variety of distributed microservices. 

This talk presents the four types of Sagas outlined in the '87 paper and then introduces an implementation of one of those techniques in Erlang. The talk finishes with an overview of how to write your own property based tests which help assure correctness and robustness in implementation.

Talk objectives:

  • What Sagas are, how they might be implemented in Erlang, an overview of property based testing.

Target audience:

  • Intermediate to advanced Erlang and/or Elixir programmers


Mark has been a programmer for more than 20 years. In the past 5 years he has been writing Erlang more or less continuously for his day job. These days Mark considers himself a passionate functional programming enthusiast.

Wrote internal and Internet-facing REST APIs in Erlang, Python, and Perl.

Expert on the riak_core distributed systems foundational tool kit.

Enjoys keeping up with academic research and publications about distributed systems.

Frequent open source contributor (

  • Primary maintainer of an EC2 client library (Net::Amazon::EC2)
  • Primary maintainer of the perldoc utility. (Pod::Perldoc)
  • Contributor to the Docker project.
  • Author of a tool to install Erlang releases side-by-side and switch between them easily.
  • Creator of to help developers learn Erlang.
  • Several other web service clients in python, perl and Erlang.

Started and coordinate a functional programming languages meet up in Houston. Also active in local Perl and Python meetups as a speaker and attendee.

Speaker at OSCON 2011, 2012, 2013, Strange Loop 2014, RICON 2014, 2015, and Erlang Factory 2014, 2015 and other regional conferences.

GitHub: mrallen1

Twitter: @bytemeorg

Back to conference page