Skip to content

Instantly share code, notes, and snippets.

@sile
sile / damps-05.md
Last active June 30, 2019 20:33
Distributed Algorithms for Message-Passing Systems: 第五章

第五章 ネットワークを航行するモバイルオブジェクト

概要:

  • モバイルオブジェクト:
    • ユーザプロセスのリクエストに応じて、プロセスからプロセスへと移動する
  • この章では、モバイルオブジェクトがネットワークを航行するためのアルゴリズム、を扱う:
    • 性質の異なる三つの分散アルゴリズムを取り上げる
    • 全てのアルゴリズムは、以下を保証する:
  • 整合性: オブジェクトは同時に複数プロセスに存在しない
@sile
sile / damps-04.md
Last active May 24, 2022 09:57
Distributed Algorithms for Message-Passing Systems: 第四章

第四章 リーダー選出アルゴリズム

抜粋

  • リーダー選出問題を扱った章
  • リーダー選出:
    • 分散システムを構成するプロセス群中から一つを選ぶ
    • 通常、選ばれたプロセスは、調整/制御を目的とし、特別な役割を果たすことが要求される
  • リーダー選出は分散システムの対称性を崩す
@t3t5u
t3t5u / gist:d8c1b65e7dbd54ae4549
Last active February 14, 2016 06:23
Plumtree

Push-Lazy-Push Multicast Tree.

高いスケーラビリティ、信頼性 (Reliability) 、回復力 (Resiliency) を達成するため、 流行性のブロードキャスト (Epidemic Broadcast) と、 決定論的なツリーに基づくブロードキャスト (Deterministic Tree-Based Broadcast) を統合する。

純粋な Gossip Protocol と異なり、ブロードキャスト用のツリーを構築するフェーズで、冗長な転送経路が取り除かれるので、重複するメッセージが大量に転送されることはない。

import scalaz._, Scalaz._
case class KnightPos(c: Int, r: Int) {
def move: List[KnightPos] =
for {
KnightPos(c2, r2) <- List(KnightPos(c + 2, r - 1), KnightPos(c + 2, r + 1),
KnightPos(c - 2, r - 1), KnightPos(c - 2, r + 1),
KnightPos(c + 1, r - 2), KnightPos(c + 1, r + 2),
KnightPos(c - 1, r - 2), KnightPos(c - 1, r + 2)) if (
((1 |-> 8) element c2) && ((1 |-> 8) contains r2))
@yukitos
yukitos / Collector.fs
Last active October 3, 2015 16:02
WIP: Trying to fix MissingMethodException of Persimmon.VisualStudio.TestExplorer.
namespace Persimmon.Runner.Wrapper
open Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging
open System
open System.Collections.Generic
open System.Reflection
module private TestCollectorImpl =
open Persimmon
@leque
leque / freer.ml
Last active September 30, 2021 07:44
Freer monad in OCaml
(*
Requirement: higher, ppx_deriving.show
*)
(*
Lightweight higher-kinded polymorphism
https://ocamllabs.github.io/higher/lightweight-higher-kinded-polymorphism.pdf
*)
open Higher
@leque
leque / freer-monad.scm
Last active May 11, 2016 01:35
Freer monad in Scheme
;;;; Freer monad in Scheme
;;;; See also
;;;; * "Freer monads, more extensible effects"
;;;; http://dl.acm.org/citation.cfm?doid=2804302.2804319
;;;; * Free monad in Scheme https://gist.github.com/wasabiz/951b2f0b22643a59aeb2
(use gauche.record)
(use util.match)
;;; data Freer f a where
;;; Pure :: a -> Freer f a
@voluntas
voluntas / webrtc.rst
Last active January 23, 2024 06:57
WebRTC の未来
@sile
sile / damps-01.md
Last active May 1, 2020 19:36
Distributed Algorithms for Message-Passing Systems: 第一章

第一部 分散グラフアルゴリズム

第一部は分散グラフアルゴリズムを扱う:

  • 分散システムをグラフと見立てる
    • 頂点はプロセス(ノード)に対応
    • 辺は通信チャンネルに対応

五章構成:

  • 一章: 基礎定義とネットワーク探索
@sile
sile / damps-frontmatter.md
Last active June 30, 2019 20:33
Distributed Algorithms for Message-Passing Systems: formatter and backmatter

前付

序文

分散コンピューティングとは何か?

1970年代後半に生まれた:

  • 研究者/実践者が物理分散システムに固有の性質に取り組み始めた