Skip to content
gqlxj1987's Blog
Go back

Golang Distributed Data Store

Edit page

原文链接

Timbala

“A distributed system is a model in which components located on networked computers communicate and coordinate their actions by passing messages.”

Requirements:

OpenTSDB

分成多个里程碑

最终集中在几点:

hashicorp’s memberlist

Consistent hashing:

func Hash(key uint64, numBuckets int) int32 {
    var b int64 = -1
    var j int64
    for j < int64(numBuckets) {
        b = j
        key = key*2862933555777941757 + 1
        j = int64(float64(b+1) * (float64(int64(1)<<31) / float64((key>>33)+1)))
    }
    return int32(b)
}

这里的测试挺有意思


Edit page
Share this post on:

Previous Post
TSDB from Scratch
Next Post
Terratest