lecture1(introduction)
为什么需要分布式系统
四点:
分布式系统的挑战
基础设施:Storage、Computing、Communication
main topics
主要是四个方面:容错性、一致性、性能、实现
mapreduce
略……,详见论文
mapreduce 实现
注:map阶段都是在本地完成计算,reduce阶段才需要网络传输
lecture2(Threads and RPC)
why go
thread of execution
why threads
对于《6.824》这门课程而言,主要是为了并发;
具体设计以下三个方面:IO并发、多核并行、使用方便
thread challenges
主要面临的几个问题及其解决方式:
竞态条件
:尽量避免共享内存、使用锁;
协调
:使用channel(Go)、使用条件变量;
死锁
:……
注:视频中还讲解了Go并发编程的代码实例,此笔记略去……
When to use sharing and locks, versus channels?
Most problems can be solved in either style
What makes the most sense depends on how the programmer thinks
state -- sharing and locks
communication -- channels
For the 6.824 labs, I recommend sharing+locks for state,
and sync.Cond or channels or time.Sleep() for waiting/notification.
crawler
注:视频中还讲解了Go爬虫的代码实例,此笔记略去……RPC
RPC 实现方式:
注:视频中还讲解了Go RPC的代码实例,此笔记略去……