《Redis深度历险》Chapter 1 Learn Note

1.7 布隆过滤器其数据结构包含一个大型的位数组和若干个不一样的无偏hash函数。所谓无偏即能够把元素的hash值计算得比较均匀,让元素被映射到位数组中的位置比较随记。输入预计元素数量:n错误率:输出位数组长度 lhash函数的最佳数量 [code lang="cpp"k = 0.7 * (l / nf = 0.6185 ^ (l / n[/code空间占用估计http://krisives.github.io/bloom-calculator误判率[code lang="shell"f = (1 - 0.5^t) * k # k 是 hash函数的最佳数量[/code应用爬虫重复URL过滤NoSQL数据库领域,降低磁盘IO垃圾邮箱过滤1.9 漏斗限流维护漏斗属性:漏斗容量、漏嘴流水速率、漏斗剩余容量与上一次漏水时间。每次灌水(请求)前,进行计算给漏斗腾出空间。能够腾出多... Read More

《DATA STRUCTRUES A Psuedocode Approach with C++》Chaper 3. Linked List Learn Note

3-1 LINEAR LIST CONCEPTLinear lists can be divided into two categories: general and restricted.In a general list, data can be inserted and deleted anywhere and there are no restrictions on the operations that can be used to process the list. Such as the random list, ordered list.In a restricted list, data can only be added or deleted at the ends of the structure and processing is restricted to op... Read More

《MySQL High Availability》Chapter 1&3 Learn Note

Part I. High Availability and ScalabilitOne of the database features that supports both high availability and scalability in an application is replication.Replication is used to create redundancy in the database layer as well as to make copies of the databases available for scaling the reads.Part I covers how you can use replication to ensure high availability and how you can scale your system.Chapter 1 Introductio... Read More

《DATA STRUCTRUES A Psuedocode Approach with C++》Chapter 2. Searching Learn Note

Chapter 1 Introductio1-2 The Abstract Data Typ什么事抽象数据类型(ADT)?下面是我的理解描述的是一种抽象的数据,那么这个数据的抽象属性该如何描述呢?定义一个(抽象的)数据,其中包含数据的存储方式,一些操作方法。但是,对外屏蔽其实现细节。也就是说,对于使用者而言,知道它能做些什么事情,但不需要知道它是如何实现的。即抽象数据类型。举例来说,C++中的Stack,Queue,Java中的Class即为抽象数据类型的例子。Chapter 2 Searchin2-1 List SearcheSequential SearcSequential Search(顺序搜索Sentinel Search(哨兵搜索哨兵搜索,相对于顺序搜索,主要是通过在序列尾部追加目标值,进而减少在搜索过程中下标索引的判断次数,以提升搜索性能。Probability Search(概率搜索... Read More