RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

A gem for distributed locking based on Google Cloud Storage

I wrote a gem for distributed locking based on Google Cloud Storage. It can be used for ensuring mutual exclusion in workloads that span multiple machines. I use this for ensuring mutual exclusion in Fullstaq Ruby’s Github Actions pipeline.

Before writing this library I spent quite some time in designing the algorithm, addressing caveats (particular all the dangers that could happen outside the happy path) and ensuring correctness. I blogged about this some time ago.

Compared to Redis-based locks (such as Redlock), this library is safer because it addresses the critiques documented by Martin Kleppmann.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in