Redis开源代码读书笔记二(源代码及工程结构)

Redis是一款采用C语言开发的<Key, Value>内存数据存储系统。今天主要3.0.7版本的的源代码和工程结构,并初步分解一下Redis内部开发模块及组成。

从Makefile文件和其执行过程及输出日志,可以分析出如下相关内容:

a)Redis程序组成

==》redis-benchmark:性能测试程序
==》redis-check-aof:日志检查程序
==》redis-check-dump:本地数据库检查程序
==》redis-cli:客户端程序
==》redis-server redis-sentinel(redis-server副本) :服务端程序


b)Redis组件组成

==》Redis C接口hiredis
==》jemalloc组件(支持tcmalloc,jemalloc,libc内存管理)
==》linenoise组件(readline的替代,详见https://github.com/antirez/linenoise/)
==》lua组件


c)Redis程序模块大致切分


d)Redis基本模块对应的简单描述


==》adlist:A generic doubly linked list implementation
==》ae:A simple event-driven programming library
==》anet:Basic TCP socket stuff library
==》aof:AOF rewrite buffer implementation
==》bio:Background I/O service for Redis
==》bitops:Bit operations.
==》blocked:generic support for blocking operations like BLPOP & WAIT.
==》cluster:Redis Cluster implementation.
==》config:Configuration file parsing and CONFIG GET/SET commands implementation.
==》crc16:CRC16 implementation according to CCITT standards.
==》crc64:CRC64 variant with "Jones" coefficients and init value of 0.
==》db:db operations
==》debug:debug operations
==》dict:Hash Tables Implementation.
==》endianconv:Endian conversions utilities.
==》hyperloglog:Redis HyperLogLog probabilistic cardinality approximation.
==》intset:int set operations
==》latency:The latency monitor allows to easily observe the sources of latency
==》lzf_c:LZF compression implementation
==》lzf_d:LZF decompression implementation
==》memtest:memtest like memtest86: http://www.memtest86.com/
==》multi:transaction operations
==》networking:redis network protocls
==》notify:implements keyspace events notification via Pub/Sub
==》object:Redis Object implementation.
==》pqsort:the NetBSD libc qsort implementation modified in order to support partial sorting of ranges for Redis.
==》pubsub:publish and subscribe implementation
==》rand:Pseudo random number generation functions derived from the drand48() function obtained from pysam source code.
==》rdb:redis database operations
==》release:Redis Git SHA1, Dirty status changes, Build version controls
==》replication:Asynchronous replication implementation.
==》rio:a simple stream-oriented I/O abstraction.
==》scripting:lua script support implementation
==》sds:A C dynamic strings library
==》sentinel:Redis Sentinel implementation
==》setproctitle:Linux/Darwin setproctitle.
==》sha1:SHA-1 algorithm
==》slowlog:remember the latest N queries
==》sort:SORT command and helper functions
==》sparkline:ASCII Sparklines
==》syncio:Synchronous socket and file I/O operations useful across the core.
==》t_hash:hash operations
==》t_list:list operations
==》t_set:set operations
==》t_string:string operations
==》t_zset:zset operations
==》util:utility functions
==》ziplist:The ziplist is a specially encoded dually linked list that is designed to be very memory efficient.
==》zipmap:String Map data structure optimized for size, implementing an O(n) lookup data structure, very memory efficient.
==》zmalloc:total amount of allocated memory aware version of malloc()

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值