Skip to content

Instantly share code, notes, and snippets.

View eugene70's full-sized avatar

Eugene Kim eugene70

View GitHub Profile
@eugene70
eugene70 / swim6.md
Created May 8, 2020 08:27
SWIM: 6. Conclusions and Future Work

6. Conclusions and Future Work

6. 결론 및 향후 작업

We have presented the design, implementation and performance evaluation of SWIM, a scalable weakly-consistent process group membership protocol. The SWIM project is motivated by the unscalability of heartbeat-based protocols, which are popular with distributed system designers today.

우리는 확장 가능한 약한 일관성 프로세스 그룹 멤버십 프로토콜 인 SWIM의 설계, 구현 및 성능 평가를 발표했습니다. SWIM 프로젝트는 오늘날 분산 시스템 설계자들에게 인기있는 하트 비트 기반 프로토콜의 비확장성에 의해 동기가 부여됩니다.

SWIM’s solution is based on a separation of the failure detector and membership update dissemination components of the problem. The SWIM failure detector achieves scalability by avoiding heartbeating, and by using a random peer-to-peer probing of processes instead. This provides constant overhead on group members, as well as constant expected detection time of failures. Membership updates are propagated efficiently and reliably in infection-style (epidemic style), by piggybacking on packets generated by the failure detector protocol. The addi

package ch1
case class Container(group: Set[Char], n: Int, x: Double)
object Container {
def apply(key: Char): Container = Container(Set(key), 1, 0)
}
case class World(containers: Map[Char, Container]) {
package ch2
case class Container(group: Set[Char], x: Double)
object Container {
def apply(key: Char): Container = Container(Set(key), 0)
}
case class World(containers: Map[Char, Container]) {
package ch2
import scala.collection.immutable.Queue
case class User(directFriends: Set[String] = Set.empty)
case class UserWorld(users: Map[String, User]) {
def befriend(user1: String, user2: String): UserWorld = {
val u1 = users(user1)
val u2 = users(user2)
package aoc2020
object Day03:
type InputType = Array[Array[Char]]
private def ready(input: String): InputType =
input.linesIterator
.map(_.trim)
.filter(_.nonEmpty)
.map(_.toCharArray)
package aoc2020
object Day04:
type InputType = Array[Array[(String, String)]]
val mandatoryFields: Seq[String] = Seq("byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid")
val validators: Map[String, String => Boolean] = Map(
("byr", s => "1920" <= s && "2002" >= s),
("iyr", s => "2010" <= s && "2020" >= s),
("eyr", s => "2020" <= s && "2030" >= s),
package aoc2020
object Day05:
type InputType = List[Int]
@main def day05: Unit =
val testData = time("testReady", () => ready(testInput))
time("tesPart1", () => part1(testData)) // should be 820
time("testPart2", () => part2(testData)) // should be 0 = not found
package aoc2020
object Day06:
type InputType = Seq[Seq[String]]
@main def day06: Unit =
val testData = time("testReady", () => ready(testInput))
time("tesPart1", () => part1(testData)) // should be 11
time("testPart2", () => part2(testData)) // should be 6
package aoc2020
object Day07:
type InputType = Map[String, Map[String, Int]]
@main def day07: Unit =
val testData = time("testReady", () => ready(testInput))
time("tesPart1", () => part1(testData)) // should be 4
time("testPart2", () => part2(testData)) // should be 32
package aoc2020
object Day08:
object Op extends Enumeration:
val NOP: Op.Value = Value("nop")
val ACC: Op.Value = Value("acc")
val JMP: Op.Value = Value("jmp")
implicit class Executor(op: Value):