Signle Value Consensus是这样一个问题,假设有许多Process (P1, P2 … Pn),每个Process可以Propose任意value,那么要求实现这样一个算法,使得这N个Process可以达成一致,即Decide on a same signle value. 达成一致本来不难,不过如果考虑到各种可能出现的故障,问题就复杂了。比如Process Failure, Message loss etc. Consensus问题在完全异步系统(Asynchronous)是无解的(FLP Impossibility),这里的系统假设是Partitialy Synchronous System. (对这两个系统假设的定义详见之前的博文)
Paxos是算法原作者Leslie Lamport提出来的一个假想希腊城邦名,更详细的故事背景可见原论文(1998)The Part-Time Parliament.
这个算法以难懂和难正确实现出名…我在这门课的最后一周卡了快一个月,也不是很好地理解它= =。Lamport 2001年还重写了篇论文,叫Paxos Made Simple,然而还是一样很难懂…
This is the note for Reliable Distributed Algorithm Week 2 - Basic Abstractions and Failure Dectectors. It discusses what’s a Partitialy Synchronous System, and one of Failure Dectectors - Eventually Perfect Failure Dectectors (EPFD) under the assumption of Partitialy Synchrony.
This post is about how to use Java Socket to build a simple http server responding to GET request. We first discuss how to do it with single thread, then we extend the server to multi-thread. It’s part of note and the assignment of Distributed Java offered by Rice University at Coursera. (Week 2 and 4).
This note talks about Optimistic Concurrency, Concurrent Queue data structure, the notion about Linearizability and Concurrent Hash Map. Finally, this week’s homework is about a concurrent algorithm to find a Minimum Spaning Tree in an undirected graph called Boruvka algorithm.
– Concurrent Programming in Java, Week4, Coursera
Actor pattern is a high level approach to concurrent programming, it forces all accesses to an object to be isolated by default. Other method communicate with Actor by sending message to it.
Concurrent Programming in Java - Week3