I’ve published an article on the Google Cloud Blog about the leader election and
distributed consensus concepts, where they’re useful and why they are
non-trivial problems. The artice shows you how to implement your own distributed
lock easily by using Google Cloud Storage and the consistency guarantees it
provides.