摘要: 1 #pragma once 2 3 #include <string> 4 #include <unordered_map> 5 #include <mutex> 6 #include <random> 7 #include <ctime> 8 9 #ifdef FI_FLAG 10 11 // 阅读全文
posted @ 2024-02-19 15:44 william-cheung 阅读(4) 评论(0) 推荐(0) 编辑
摘要: C++ enum 转 string 阅读全文
posted @ 2023-05-17 23:40 william-cheung 阅读(373) 评论(0) 推荐(0) 编辑
摘要: /* uint16_t xorsum(const char *buf, int len); */ .global xorsum .text xorsum: mov $0xffffffff,%eax mov %esi, %edx shr %edx jz loop_done mov %edx, %ecx 阅读全文
posted @ 2021-03-27 14:01 william-cheung 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 1. SerializableSame results as if transactions executed one-by-one.Even though they may actually execute concurrently.r/w transactions are serializabl 阅读全文
posted @ 2019-08-10 22:24 william-cheung 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Linearizablity at a Single Site Note that: In (1)(2)(3) get()s and inc()s appear to be executed in sequential order (Edited on Mar. 15th, 2020) More p 阅读全文
posted @ 2019-07-22 22:37 william-cheung 阅读(300) 评论(0) 推荐(0) 编辑
摘要: Comparisons between HDFS and GFS 阅读全文
posted @ 2019-04-20 12:05 william-cheung 阅读(353) 评论(0) 推荐(0) 编辑
摘要: Typical Properties of Consensus Algorithms 1. safety: produce correct results under all non-Byzantine conditions include network delays/partitions, pa 阅读全文
posted @ 2019-04-11 22:26 william-cheung 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Zookeeper is a general-purpose coordination service. The ZooKeeper service comprises an ensemble of servers that use replication to achieve high avail 阅读全文
posted @ 2019-03-20 15:00 william-cheung 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1. Leaky Bucket (漏桶) 漏桶是一种常用的限流策略。NGINX 和 QEMU 中利用漏桶来实现限流。在漏桶模型中,桶的容量是固定的,当桶被流进的水填满时,多余的水就会溢出;虽然水可以以不同的速率流进桶中,但却必须以固定的速率从桶底部漏出。 可以将漏桶看成一个队列,队列有固定大小的容量 阅读全文
posted @ 2018-04-26 20:10 william-cheung 阅读(1435) 评论(0) 推荐(0) 编辑
摘要: pqsort implemented in java 阅读全文
posted @ 2018-04-20 20:51 william-cheung 阅读(374) 评论(0) 推荐(0) 编辑