这是我计划本周五在部门内分享的内容,先贴到这里: Redis是一款最近比较热门的Key-value数据库,它的代码量少,配置简单,与memcache同样轻量级,对于了解NoSQL是一个很好的入口,相信通过介绍之后,无论是前端和后端开发工程师,都会迅速的爱上这款软件!``` * Intro: o http://dreamhead.blogbus.com/logs/61443218.html o http://labs.alcacoop.it/doku.php?id=articles:redis_land o http://code.google.com/p/redis/wiki/ProtocolSpecification o http://code.google.com/p/redis/wiki/CommandReference

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
\* Features:
      o Key-value db
      o Fast: all data are loaded in memory and saved on disk
      o Supporting data types: Strings(<1Gb), Lists, Hashes, Sets, Ordered sets.
      o Interfaces: push/pop、add/remove、sort
      o Replication:
            + 一个master支持多个slave
            + Slave可以接受其他slave的连接来替代他连接master
            + 复制在master是非阻塞的,而在slave是阻塞的
            + 复制被利用来提供可扩展性,在slave端只提供查询功能及数据的冗余

\* Download:
      o [http://code.google.com/p/redis/](http://code.google.com/p/redis/)

\* Install:
      o [http://blog.chinaunix.net/u3/102568/showart\_2339142.html](http://blog.chinaunix.net/u3/102568/showart_2339142.html)

\* Start Server: ./redis-server
\* Close Server: ./redis-cli shutdown
\* Command Line Client: ./redis-cli
\* Bindings: [http://code.google.com/p/redis/#Supported\_languages](http://code.google.com/p/redis/#Supported_languages)
\* APIs: [http://code.google.com/p/redis/wiki/CommandReference](http://code.google.com/p/redis/wiki/CommandReference)
\* Best Practices:
      o Counter
      o message queue
      o user db
      o Autocomplete: [http://antirez.com/post/autocomplete-with-redis.html](http://antirez.com/post/autocomplete-with-redis.html)
      o Foursquare.com

```