Skip to main content

· 2 min read
WelJunyu

LRU-K 中的 K 代表最近使用的次数,传统的 LRU 算法可认为是 LRU-1。LRU-K 核心思想:将“最近使用过 1 次”的判断标准扩展为“最近使用过 K 次”。其主要目的是解决 LRU-1 算法“缓存污染”的问题。

· 35 min read
WelJunyu

Abstract  MapReduce is a programming model and an associated implementation for processing and generating large data sets. Users specify a map function that processes a key/value pair to generate a set of intermediate key/value pairs, and a reduce function that merges all intermediate values associated with the same intermediate key. Many real world tasks are expressible in this model, as shown in the paper......

MapReduce: Simplified Data Processing on Large Cluster 的部分翻译

· 62 min read
WelJunyu

Abstract  Recently, the Log-Structured Merge-tree (LSM-tree) has been widely adopted for use in the storage layer of modern NoSQL systems. Because of this, there have been a large number of research efforts, from both the database community and the operating systems community, that try to improve various aspects of LSM-trees. In this paper, we provide a survey of recent research efforts on LSM-trees so that readers can learn the state-of-the-art in LSM-based storage techniques. We provide a general taxonomy to classify the literature of LSM-trees, survey the efforts in detail, and discuss their strengths and trade-offs. We further survey several representative LSM-based open-source NoSQL systems and discuss some potential future research directions resulting from the survey.

该篇博客的主要内容是对该综述论文的理解与转述。

· 11 min read
WelJunyu

目的

本文将会仿照 Docker Container 现有的基本功能,用 Go 简单地实现自己的 Mini Container。后续章节逐步使用 Linux 的 Namespace 和 CGroups 对 Container 与宿主机进行隔离。Namespace 决定了 Container 能看见什么?CGroups 决定了 Container 能使用什么?

// docker         run image <cmd> <params>
// go run main.go run <cmd> <params>

· 2 min read
WelJunyu

全称字符串前缀哈希法,把字符串变成一个 p 进制数字(哈希值),实现不同的字符串映射到不同的数字。 对形如 X1X2...XnX_{1}X_{2} ... X_{n} 的字符串,采用字符的 ASCII 码乘上 PP 的次方来计算哈希值。

· 11 min read
WelJunyu

本文将使用 httpGetBody 作为需要缓存的函数。它会进行 HTTP GET 请求,并获取 HTTP 响应 Body。这个函数的调用开销较大,现在想对每一个进行的 HTTP GET 请求的结果保存下来。