redis的一些tips

这是我计划本周五在部门内分享的内容,先贴到这里:

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

    * 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/

    * Install:
          o 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
    * APIs: 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
          o Foursquare.com

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

You are commenting using your WordPress.com account. Log Out /  更改 )

Google photo

You are commenting using your Google account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

Connecting to %s