Hi there 👋🏻

This is my Personal Knowledge Management

  • Technical Debt
  • Workflow
  • Efficiency Tools

You can filter out the top nodes by tag “top-node” and the backlink at the bottom of the article for a better view.

Vector clocks

给定的 Lamport 时间戳 \(L(a)\) 和 \(L(b)\) 并且 \(L(a) < L(b)\),我们推断不出 \(a \rightarrow b\) 或者 \(a || b\).1 要区分平行的这些事件,需要 vertor clocks: 假定分布式系统中有 \(n\) 个节点,\(N = \langle N_{1},...

FIFO broadcast

Definition 最弱的广播类型称为先进先出(FIFO)广播。在这个模型中,由同一节点发送的信息按照发送的顺序传递。例如下图中,\(m_{1}\) 必须在 \(m_{3}\) 之...

March 8, 2024 892 words 2 min

Total order broadcast

Definition 总秩序广播(total order broadcast),有时也被称为原子广播(atomic broadcast)。FIFO broadcast 和 Causal broadcast 允许不同的节点以不同...

March 8, 2024 837 words 2 min

Distribution System

Remote Procedure Call Remote Procedure Call (RPC) 使得调用远程函数就像调用本地函数一样,这样就不需要关心资源的具体问题,实际上 RPC 是将方法调用转换成了网络通信。但是遇到通信失败怎...

Causality and Happen-before relation

The Happens-before relation An event is something happening at one node (sending or receiving a message, or a local execution step). event \(a\) happens before event \(b\), written \(a \rightarrow b\). 那么在分布式,有三种情况,满足其中一条,则 \(a\) 是发生在 \(b\) 之前: \(a\) 和 \(b\) 发生在相同节...

Causal broadcast

Definition Causal broadcast 算法有点类似于 FIFO broadcast: 每条被广播的消息附上的不是一个序列号,而是一个整数的向量。这种算法有时被称为向量时钟算法,向量时钟...

Lamport clocks

Lamport clocks algorithm Lamport clocks in words Figure 1: lamport-example-simple 每个节点都维护一个计数器 \(t\),每一个当前节点事件 \(e\) 发生时,自增 1。 增长后的值设为 \(L(e)\) 发送消息时附带上当前的计数 \(t\) 消息...

Raft consensus algorithm

Figure 1: node-state-transitions-in-raft 一个节点有三种状态:leader,candidate 和 follower。当一个节点第一次运行,或者崩溃后恢复时,处于 follower 的状态并且等待其...

March 8, 2024 2897 words 6 min

Hugo

Install brew install hugo Add backlink 在 themes/xxx/layouts/partials/ 下新增 backlink.html​,内容如下。 {{ $re := $.File.BaseFileName }} {{ $backlinks := slice }} {{ range .Site.AllPages }} {{ if and (findRE $re .RawContent) (not (eq $re .File.BaseFileName)) }} {{ $backlinks = $backlinks | append . }} {{ end }} {{ end }}...

March 6, 2024 521 words 2 min

setting up pass on git with a gpg key

References pass : 密码管理本不复杂 - Nayuki’s Archive Home · mssun/passforios Wiki · GitHub https://github.com/benthamite/dotfiles/blob/master/emacs/config.org#password-store Pass: The Standard Unix Password Manager Source: Setting up pass on git with a gpg key · GitHub Pass for iOS private repos 需要用 SSH Key 来访问。参考 Generating a new SSH key and adding it to the ssh-agent - GitHub Docs 生...

January 16, 2024 340 words 1 min