在看一个slideshare的PPT结果没有下载,只好做下笔记了
key-value store
all data lives in memory
keys can expire(or not)
fast,light-weight

persistence
multiple databases
Queryable keyspace
Support for integer counters
higher level data structures
atomic operations
ability to paginate lists without mutating them
master-slave replication
Optional VM feature(new)

ervery write command is logged ASAP
Commands replayed when the server is restarted
Configurable speed/safety(safest by default)

use the select command;0-15 are valid by default,but you can add more in redis.conf
useful for segmemting key namespaces,especially when key queries are needed
MOVE command can be used as a locking primitive

Data Structures
Strings
Strings-as-integers(used by INCR/DECR)
List of Strings
Set of Strings(unique list)
Sorted Set of String(and weights)(ZSET)

Command overview
strings:get,set,increment,decrement
Lists:lrpush,lpop,llen,lrange,ltrim
sets:add,remove,move,length,intersect,union,diff,random
others:save,lastsave can be used to force&verify disk persistence

Atomic Operations
LPUSH/RPUSH:append to head/tail of list
LPOP/RPOP:return & remove first/last element of list
RPOPLPUSH:return & remove the last element of source list and push to the head of the destination list
GETSET:set a key to a new value and return the old value
MGET/MSET:get or set multiple keys to multiple values
SMOVE:move a value from one set to another

Replication
Slave can be used for scalability or redundancy
A master can have multiple slaves.
Slaves are able to accept other slave connections
Redis replication is non-blocking on the master,but blocking on the slave(can't respond to uqeries during initial sync)
Slaves are able to automatically reconnect after an outage

Memcache Replacement
Why? Same as Memcached,but you get more "for free";
Many databases from a single instance of REdis(instead of using namespaces)
Ability to easily backup/transfer state(dump.rdb)
Watch live command on a running instance with the MONITOR command (instead of restarting with -v)
Opportunity to use Redis for other things once you've switched

Work Queue
LPUSH and RPOP were made for this
Resque
Created by Chris Wanstrath.Heavily inspired by DelayedJob.Currently used by GitHub.
Provides:
A Ruby library for creating,querying,and processing jobs
A Rake task for starting a worker which processes jobs
A Sinatra app for monitoring queues,jobs,and workers.

Replace MySQL ORDER BY RAND()
ORDER BY RAND() is very slow(even with a LIMIT clause)
DUplicating the list of IDs as a Redis set is relatively cheap
SRANDMEMBER is fast

Other Interesting Uses of Redis
Nginx HTTP Redis module for cacheing with Redis(ngx_http_redis)
LLOOG.com:Realtime site usage statistics,use alongside Google analytics
EZMobius'Fair Work Scheduler example
Sikwamic:Simple Redis-backend Comet server
RestMQ-A REST/JSON/HTTP based message queue built on Redis
redis-textsearch  A simple full-text search for multiple data stores

Redis PPT abstract相关推荐

  1. java优化代码常见套路

    目录 程序员的痛点(烂代码) 该如何优化代码 前台后台两次md5加盐加密 JSR303和全局异常处理 Redis通用的key生成策略和通用的RedisService方法 程序猿的必读书籍 程序员的痛点 ...

  2. 麦克尼马尔检验(McNemar test)

    麦克尼马尔检验(McNemar test) 前言 在统计学中,McNemar 检验是用于配对 名义数据的统计检验.它应用于具有二分特征的2 × 2列联表,具有匹配的主题对,以确定行和列的边际频率是否相 ...

  3. Spring深入学习笔记

    目录 1.spring运行流程 2.Bean定义,注册,获取 ApplicationContext 1.bean对象的创建流程 2.bean的扩展接口 3.回调接口 4.监听与事件 5.Factory ...

  4. Java秒杀系统方案优化 高性能高并发实战 学习笔记

    秒杀系统 (一)搭建环境 自定义封装Result类 自定义封装CodeMsg类 集成redis和rabbit 封装RedisService类 断言和日志测试 (二)实现用户登录和分布式Session ...

  5. 微博计数:从关系服务到访问计数, Redis 持续优化支撑万亿级访问(含 PPT)

    关注"数据和云",精彩不容错过 编者按:本文由刘东辉向高可用架构供稿,基于在 Redis 用户交流会上的演讲内容整理.这是一篇历史文章,但是仍然可以帮助我们理解 Redis 的应用 ...

  6. 同程旅游缓存系统设计:如何打造Redis时代的完美体系(含PPT)

    导读:高可用架构 7 月 30 日在上海举办了『互联网架构的基石』专题沙龙,进行了闭门私董会研讨及对外开放的四个专题的演讲,期望能促进业界对互联网基础服务及工具的讨论,本文是王晓波分享同程旅游缓存系统 ...

  7. redis内部分享ppt

    https://www.cnblogs.com/qkbao/p/6664757.html 作者:青客宝团队 Redis:最好的缓存数据库 说Redis是缓存服务,估计有些人会不开心,因为Redis也可 ...

  8. 青客宝团队redis内部分享ppt

    Redis:最好的缓存数据库 说Redis是缓存服务,估计有些人会不开心,因为Redis也可以把数据库持久化,但是在大多数情况Redis的竞争力是提供缓存服务.说到缓存服务必然会想到Memcached ...

  9. redis泡菜5_《redis讲解》PPT课件.pptx

    redis讲解 王江财 目 录 1 2 3 4 5 6 redis简介 redis数据类型 主从复制 持久化 redis集群 jedis及集群应用 7 发布与订阅功能 $$1redis简介 一.什么是 ...

最新文章

  1. python初学者教程我要自学网-我要自学网--json 数据解析-python。
  2. iap升级问题 stm32f103r8_STM32的基于串口的IAP固件升级与加密
  3. 世界备份日,您的数据足够安全吗?
  4. Java ByteArrayInputStream mark()方法与示例
  5. C# Winform 窗体美化(八、Icon)
  6. 第二节JVM JRE 和JDK介绍
  7. sql script: Calculating Days
  8. 汇编语言程序设计实验三
  9. python实现粒子滤波目标跟踪_QT+Opencv粒子滤波算法实现视频目标跟踪——如何选择跟踪算法...
  10. X509TrustManager信任SSL证书
  11. 严禁使用计算机存储,处理,传输涉密信息,非涉密计算机及其网络保密管理要求...
  12. 考研英语近义词与反义词·四
  13. 使用ajax报405错误
  14. 微信小程序中可以使用calc 函数用于动态计算长度值。
  15. 用Canvas为网页添加动态背景
  16. php面向对象--php面向对象ppt
  17. javascript 自己主动绑定JS callback 的方法函数
  18. arcgis中python坡度计算公式_ArcGIS教程:坡度
  19. 由 Cheech Chong 创作的 My Homies 照亮了 The Sandbox
  20. 熔化极氩弧焊(MIG,MAG)

热门文章

  1. crond服务及用法
  2. MVP登录和注册页面Activity类 生成二维码 异常捕获类
  3. wxpython菜单的位置_wxpython教程:[5]次级菜单
  4. 英语词根词缀记忆法(全集)_闭着眼睛就能背好的托福词汇记忆法
  5. 前端小白,如何快速提升自己?了解3点,找工作不用愁
  6. 初级前端如何突破瓶颈
  7. 计算机应用基础0035形考答案,计算机应用基础0035形考答案
  8. java邮件附件名称乱码_Javamail 中附件中文名字乱码祥解 (转)
  9. arraylist线程安全吗_Java面试复习-IO和多线程
  10. webstorm怎么建php文件夹,webstorm怎么创建css