Skip to content

Instantly share code, notes, and snippets.

View eugene70's full-sized avatar

Eugene Kim eugene70

View GitHub Profile

[공통] 마크다운 markdown 작성법

1. 마크다운에 관하여

1.1. 마크다운이란?

Markdown은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.

1.2. 마크다운의 장-단점

1.2.1. 장점

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="test">test text</div>
<script id="jsbin-javascript">

Consul-api vs Consul-client

Compairation Table

  • surveyed at Sep 21, 2019
Items consul-api consul-client
Stars 317 453
@eugene70
eugene70 / swim1.md
Created May 8, 2020 08:14
SWIM: 1. Introduction

1. Introduction

1. 소개

As you swim lazily through the milieu, The secrets of the world will infect you.

당신이 주변을 느리게 헤엄칠 때, 세상의 비밀이 당신을 감염시킨다.

Several large-scale peer-to-peer distributed process groups running over the Internet rely on a distributed membership maintenance sub-system. Examples of existing middleware systems that utilize a membership protocol include reliable multicast [3, 11], and epidemic-style information dissemination [4, 8, 13]. These protocols in turn find use in applications such as distributed databases that need to reconcile re- cent disconnected updates [14], publish-subscribe systems, and large-scale peer-to-peer systems[15]. The performance of other emerging applications such as large-scale cooperative gaming, and other collaborative distributed applications, depends critically on the reliability and scalability of the membership maintenance protocol used within.

인터넷을 통해 실행되는 몇몇 대규모 P2P 분산 프로세스 그룹은 분산 멤버십 유지 관리 서브 시스템에 의존합니다. 멤버십 프로토콜을 사용하는 기존 미들웨어 시스템의 사례로는 신뢰할 수있는 멀티 캐스트[

@eugene70
eugene70 / swim2.md
Created May 8, 2020 08:16
SWIM: 2. Previous Work

2. Previous Work

2. 사전 작업

In traditional distributed all-to-all heartbeating failure detection algorithms, every group member periodically transmits a “heartbeat” message (with an incremented counter) to all other group members. A member M[i] is declared as failed by a non-faulty member M[j] when does not receive heartbeats from for some consecutive heartbeat periods.

전통적인 분산 전역 하트 비트 실패 감지 알고리즘에서 모든 그룹 멤버는 주기적으로 (증가 된 카운터와 함께) "하트 비트" 메시지를 다른 모든 그룹 멤버에게 보냅니다. 멤버 M[i]가 연속적인 하트 비트 기간 동안 하트 비트를 전송하지 못하면 결함이 없는 멤버 M[j]가 해당 멤버를 실패한 것으로 선언합니다.

Distributed heartbeating schemes guarantee that a faulty member is always detected as such at any non-faulty member (within a time interval after its failure)(Ibid.4, This property is called Strong Completeness), since a member that has crashed also stops sending heartbeat messages. However, the accuracy and scalability guarantees of these protocols differ, depending on the actual mechanism used to disseminate the heartbeats.

분산 하트 비트 방식은 고장이 발생한 멤버가 하트 비트 메시지 전송을

@eugene70
eugene70 / swim4.md
Created May 8, 2020 08:23
SWIM: 4. A More Robust and Efficient SWIM

4. A More Robust and Efficient SWIM

4. 보다 견고하고 효율적인 SWIM

Section 3 described the basic SWIM protocol that disseminates membership updates (resulting from member joins, leaves or failures) using network multicast. However, network multicast primitives such as IP multicast etc., are only best-effort - message losses within the network can cause arbitrary and correlated non-receipt of membership changes at any group member. In Section 4.1, we describe the design of a Dissemination Component that piggybacks membership updates on the ping and ack messages sent by the failure detector protocol. This completely eliminates the generation of extra packets by the Dissemination Component (viz., multicasts). The only packets generated by SWIM then are pings, ping-reqs and acks, thus giving a constant expected message overhead per group member. This approach results in an infection-style of dissemination, with the associated benefits of robustness to packet losses, and of low latency.

3 장에서는 네트워크 멀티 캐스트를 사용하여 멤버십

@eugene70
eugene70 / swim5.md
Created May 8, 2020 08:26
SWIM: 5. Performance Evaluation of a Prototype

5. Performance Evaluation of a Prototype

5. 프로토타입의 성능 평가

A prototype of the SWIM protocol was implemented over the Winsock 2 API, and was tested in a large cluster of commodity PCs running Windows 2000. The PC cluster was comprised of 16 450-MHz Dell PII’s, 16 1-GHz IBM x220’s, and a collection of dual and quad nodes (200-MHz to 500-MHz PII and PIII processors), communicating over a 100 Mbps Ethernet with no external load. Each node contained at most one process group member.

SWIM 프로토콜의 프로토타입은 Winsock 2 API를 통해 구현되었으며 Windows 2000을 실행하는 대규모 상용 PC 클러스터에서 테스트되었습니다. PC 클러스터는 16 x 450MHz Dell PII, 16 x 1GHz IBM x220, 듀얼 및 쿼드 노드 (200MHz ~ 500MHz PII 및 PIII 프로세서)의 집합, 외부로드 없는 100Mbps 이더넷 통신망으로 구성되었습니다. 각 노드는 최대 하나의 프로세스 그룹 구성원을 포함했습니다.

The experimental parameters were set as follows. The number of members chosen for ping-reqs was K = 1, and the protocol period used was 2 sec. Each infection (membership update) was piggybacked on at most (3 [log (N + 1)]) messages sent by each member. With this value set

@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

@eugene70
eugene70 / Exponential Backoff And Jitter.md
Last active May 28, 2020 14:13
Exponential Backoff And Jitter

Exponential Backoff And Jitter

지수 백 오프 및 지터

OCC 소개

OCC(Optimistic Concurrency Control)는 여러 작성자가 쓰기 손실없이 단일 개체를 안전하게 수정할 수있는 전통적인 방법입니다. OCC에는 세 가지 훌륭한 특징이 있습니다. 기저의 저장소를 사용할 수 있는 한 처리를 보장하고, 이해하기 쉽고, 구현하기 쉽다는 것입니다. DynamoDB의 조건부 쓰기는 DynamoDB 사용자에게 OCC를 자연스럽게 제공하며, DynamoDBMapper 클라이언트는 기본적으로 이것을 지원합니다.

OCC는 처리를 보장하지만 높은 경합에서는 여전히 성능이 떨어질 수 있습니다.

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]) {