<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>分布式系统 on Leafw&#39;s Blog</title>
    <link>https://leafw.net/en/tags/%E5%88%86%E5%B8%83%E5%BC%8F%E7%B3%BB%E7%BB%9F/</link>
    <description>Recent content in 分布式系统 on Leafw&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <managingEditor>wyr95626@gmail.com (Leafw)</managingEditor>
    <webMaster>wyr95626@gmail.com (Leafw)</webMaster>
    <copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright>
    <lastBuildDate>Sun, 13 Sep 2020 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://leafw.net/en/tags/%E5%88%86%E5%B8%83%E5%BC%8F%E7%B3%BB%E7%BB%9F/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to implement a Distribute Lock</title>
      <link>https://leafw.net/en/how-to-implement-a-distribute-lock/</link>
      <pubDate>Sun, 13 Sep 2020 00:00:00 +0000</pubDate><author>wyr95626@gmail.com (Leafw)</author>
      <guid>https://leafw.net/en/how-to-implement-a-distribute-lock/</guid>
      <description>&lt;p&gt;Every Java developer is no stranger to locks, which frequently come up in both work and interviews. However, for most small-scale projects, or single-machine applications, Java’s juc (java.util.concurrent) is generally sufficient. Yet as application scales grow and we move into distributed systems, relying solely on tools like synchronized and lock becomes inadequate. This article will discuss several common methods to implement distributed locks in such systems.&lt;/p&gt;&#xA;&lt;h2 id=&#34;database-method-for-implementing-distributed-locks&#34;&gt;Database Method for Implementing Distributed Locks &lt;/h2&gt;&#xA;&lt;p&gt;First, let’s talk about the database method, something everyone is very familiar with. Here, we use MySQL as the database. The method might vary slightly with other databases, but the general idea is the same. I will assume that everyone is familiar with the ACID of transactions and the isolation mechanism, so I won’t waste time going over these.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
