blog.huangz.me
[草稿]在 Redis 中构造可靠的发布与订阅系统 — huangz/blog
http://blog.huangz.me/diary/2013/reliable_pubsub_in_redis.html
Comments powered by Disqus. Enter search terms or a module, class or function name.
blog.huangz.me
PostgreSQL 数据库中的 JSON 数据类型 — huangz/blog
http://blog.huangz.me/diary/2014/postgresql-json-types.html
PostgreSQL 数据库中的 JSON 数据类型. PostgreSQL 数据库在本月的 18 号发布了新的 9.4 版本, 该版本的亮点之一就是增强了对 JSON 数据类型的支持, 并添加了新的 JSONB 类型。 PostgreSQL 官方这样描述 JSONB 数据类型. PostgreSQL 新添加的 JSONB 数据类型使得用户可以同时拥有关系型数据库和非关系型数据库, 而不必再在这两种数据库之间选择其中一种。 JSONB 支持快速查找 fast lookup 和基于泛化反向索引 Generalized Inverted Indexes,GIN 的简单表达式搜索查询 simple expression search query。 除此之外, 用户还可以使用新添加的多个辅助函数 support function 来提取和操作 JSON 数据, 这些函数的性能和目前最流行的文档数据库不相上下, 甚至有过之而无不及。 中的 814. JSON Types. 一节和 915. JSON Functions and Operators. Comments powered by Disqus.
blog.huangz.me
2014 年 — huangz/blog
http://blog.huangz.me/diary/2014/index.html
PostgreSQL 数据库中的 JSON 数据类型. 第 1 步 阅读数据结构实现. 第 2 步 阅读内存编码数据结构实现. 第 3 步 阅读数据类型实现. 第 4 步 阅读数据库实现相关代码. 第 5 步 阅读客户端和服务器的相关代码. 第 6 步 阅读多机功能的实现. Comments powered by Disqus. PostgreSQL 数据库中的 JSON 数据类型. Enter search terms or a module, class or function name.
tonybai.com
理解Go 1.5 vendor | Tony Bai
http://tonybai.com/2015/07/31/understand-go15-vendor
理解Go 1.5 vendor. 七月 31, 2015. 中(目前最新版本go1.5beta3)加入了一个experimental feature: vendor/. 这个feature不是 Go 1.5. 1、Russ Cox在 Golang-dev group. 上的一个名 为 proposal: external packages. 2、Go 1.5beta版发布后Russ Cox根据上面topic整理的一个 doc. 3、medium.com上一篇名为“ Go 1.5 vendor/ experiment. 但由于Go 1.5稳定版还未发布(最新消息是2015.8月中旬发布),因此估计真正采用vendor的repo尚没有。 但既然是Go官方解决方案,后续从 expreimental变成official的可能性就很大 Russ的初步计划 如果试验顺利,1.6版本默认 GO15VENDOREXPERIMENT=1 1.7中将去掉GO15VENDOREXPERIMENT环境变量。 8211; 不rewrite gopath. 8211; go tool来解决. 8211; go get兼容.
petermao.com
key | petermao的技术blog
http://www.petermao.com/tag/key
2013 年 07 月 14 日. User key就是用户输入的key,而InternalKey在user key的基础上封装了sequence num type。 Ericuni 在 redis源代码分析3 字典 上. Ericuni 在 redis源代码分析3 字典 上. Ericuni 在 redis源代码分析1 链表. 网络提供商 stable.co.cc.
petermao.com
leveldb注释8–snapshot机制 | petermao的技术blog
http://www.petermao.com/leveldb/leveldb-8-snapshot.html
2013 年 07 月 14 日. 这部分代码主要在snapshot.h与db impl.cc/.h中。 Const Snapshot* DBImpl: GetSnapshot() { MutexLock l(&mutex ); return snapshots .New(versions - LastSequence() ; }. 而对于要查找的数据结构memtable、immunable memtable与sstable来讲,其内部存储的”key”都是带sequencenumber的 上一章节的分析 ,其最终查找到的”key”会满足key = 输入的key,而sequencenumber. Status DBImpl: Get(const ReadOptions& options, const Slice& key, std: string* value) { Status s; MutexLock l(&mutex ); SequenceNumber snapshot; if (options.snapshot! NULL) { / 输出新文件 status = FinishCompactionO...
petermao.com
leveldb注释3–基础类 | petermao的技术blog
http://www.petermao.com/leveldb/leveldb-3-util.html
Leveldb注释4 平台相关 →. 2013 年 07 月 07 日. 1 内存管理(arena.cc/.h). Alloc ptr 指向基本块空闲内存位置,alloc bytes remaining 为剩余内存大小 / blocks 保存了所有的块,包括了基本块与直接分配的大块 / Allocation state char* alloc ptr ; size t alloc bytes remaining ; / Array of new[] allocated memory blocks std: vector char* blocks ; / Bytes of memory in blocks allocated so far size t blocks memory ;. 2 过滤器bloom filter的实现(bloom.cc). Open db时的options.filter policy参数指定该filter。 Bloom filter需要指定bits per key参数,表示每个key需要检测多少个bit位/保存多少个bit位。 Struct LRUHandle { void* v...
petermao.com
petermao | petermao的技术blog
http://www.petermao.com/author/peter
2013 年 07 月 14 日. 2013 年 07 月 14 日. User key就是用户输入的key,而InternalKey在user key的基础上封装了sequence num type。 2013 年 07 月 12 日. 2013 年 07 月 12 日. 从前面的分析可知,level 0级的sstable文件是由内存中的immunable memtable经过minor compact形成的(也就是直接dump),而level 0级的文件是由level-1级别的文件经过major compact形成的。 2013 年 07 月 07 日. Makefile中会先调用检测脚本build detect platform,并将设置的环境变量保存在build config.mk文件里。 随后Makefile会include build config.mk文件以进行编译,相关Makefile代码如下,其中的PLATFORM CCFLAGS等参数将在build detect platform中设置并输出给build config.mk文件. 2013 年 07 月 07 日.