没有合适的资源?快使用搜索试试~ 我知道了~
首页the little redis book【英文】
适合rdis的初学者看一下 Redis 是一个开源、支持网络、基于内存、键值对存储数据库,使用 ANSI C 编写。其开发由 VMware 主持。Redis 是最流行的键值对存储数据库。 Redis 的外围由一个键、值映射的字典构成。与其他非关系型数据库主要不同在于:Redis 中值的类型不仅限于字符串,还支持如下抽象数据类型: 字符串列表 无序不重复的字符串集合 有序不重复的字符串集合 键、值都为字符串的哈希表 值的类型决定了值本身支持的操作。Redis 支持不同无序、有序的列表,无序、有序的集合间的交集、并集等高级服务器端原子操作。
资源详情
资源评论
资源推荐
About This Book
License
The Little Redis Book is licensed under the Attribution-NonCommercial 3.0 Unported license. You should not have paid
for this book.
You are free to copy, distribute, modify or display the book. However, I ask that you always attribute the book to me,
Karl Seguin, and do not use it for commercial purposes.
You can see the full text of the license at:
http://creativecommons.org/licenses/by-nc/3.0/legalcode
About The Author
Karl Seguin is a developer with experience across various fields and technologies. He’s an active contributor to Open-
Source Software projects, a technical writer and an occasional speaker. He’s written various articles, as well as a few
tools, about Redis. Redis powers the ranking and statistics of his free service for casual game developers: mogade.com.
Karl wrote The Little MongoDB Book, the free and popular book about MongoDB.
His blog can be found at http://openmymind.net and he tweets via @karlseguin
With Thanks To
A special thanks to Perry Neal for lending me his eyes, mind and passion. You provided me with invaluable help. Thank
you.
Latest Version
The latest source of this book is available at: http://github.com/karlseguin/the-little-redis-book
1
Introduction
Over the last couple years, the techniques and tools used for persisting and querying data have grown at an incredible
pace. While it’s safe to say that relational databases aren’t going anywhere, we can also say that the ecosystem around
data is never going to be the same.
Of all the new tools and solutions, for me, Redis has been the most exciting. Why? First because it’s unbelievably
easy to learn. Hours is the right unit to use when talking about length of time it takes to get comfortable with Redis.
Secondly, it solves a specific set of problems while at the same time being quite generic. What exactly does that mean?
Redis doesn’t try to be all things to all data. As you get to know Redis, it’ll become increasingly evident what does and
what does not belong in it. And when it does, as a developer, it’s a great experience.
While you can build a complete system using Redis only, I think most people will find that it supplements their more
generic data solution - whether that be a traditional relational database, a document-oriented system, or something
else. It’s the kind of solution you use to implement specific features. In that way, it’s similar to an indexing engine.
You wouldn’t build your entire application on Lucene. But when you need good search, it’s a much better experience -
for both you and your users. Of course, the similarities between Redis and indexing engines end there.
The goal of this book is to build the foundation you’ll need to master Redis. We’ll focus on learning Redis’ five data
structures and look at various data modeling approaches. We’ll also touch on some key administrative details and
debugging techniques.
2
Getting Started
We all learn differently: some like to get their hands dirty, some like to watch videos, and some like to read. Nothing
will help you understand Redis more than actually experiencing it. Redis is easy to install and comes with a simple shell
that’ll give us everything we need. Let’s take a couple minutes and get it up and running on our machine.
On Windows
Redis itself doesn’t officially support Windows, but there are options available. You wouldn’t run these in production,
but I’ve never experienced any limitations while doing development.
A port by Microsoft Open Technologies, Inc. can be found at https://github.com/MSOpenTech/redis. As of this writing
the solution is not ready for use in production systems.
Another solution, which has been available for some time, can be found at https://github.com/dmajkic/redis/downloads.
You can download the most up to date version (which should be at the top of the list). Extract the zip file and, based
on your architecture, open either the 64bit or 32bit folder.
On *nix and MacOSX
For *nix and and Mac users, building it from source is your best option. The instructions, along with the latest version
number, are available at http://redis.io/download. At the time of this writing the latest version is 2.6.2; to install this
version we would execute:
wget http://redis.googlecode.com/files/redis-2.6.2.tar.gz
tar xzf redis-2.6.2.tar.gz
cd redis-2.6.2
make
(Alternatively, Redis is available via various package managers. For example, MacOSX users with Homebrew installed
can simply type brew install redis.)
If you built it from source, the binary outputs have been placed in the src directory. Navigate to the src directory by
executing cd src.
Running and Connecting to Redis
If everything worked, the Redis binaries should be available at your fingertips. Redis has a handful of executables.
We’ll focus on the Redis server and the Redis command line interface (a DOS-like client). Let’s start the server. In
Windows, double click redis-server. On *nix/MacOSX run ./redis-server.
If you read the start up message you’ll see a warning that the redis.conf file couldn’t be found. Redis will instead use
built-in defaults, which is fine for what we’ll be doing.
3
Next start the Redis console by either double clicking redis-cli (Windows) or running ./redis-cli (*nix/MacOSX).
This will connect to the locally-running server on the default port (6379).
You can test that everything is working by entering info into the command line interface. You’ll hopefully see a bunch
of key-value pairs which provide a great deal of insight into the server’s status.
If you are having problems with the above setup I suggest you seek help in the official Redis support group.
4
剩余29页未读,继续阅读
lierd
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2022年中国足球球迷营销价值报告.pdf
- 房地产培训 -营销总每天在干嘛.pptx
- 黄色简约实用介绍_汇报PPT模板.pptx
- 嵌入式系统原理及应用:第三章 ARM编程简介_3.pdf
- 多媒体应用系统.pptx
- 黄灰配色简约设计精美大气商务汇报PPT模板.pptx
- 用matlab绘制差分方程Z变换-反变换-zplane-residuez-tf2zp-zp2tf-tf2sos-sos2tf-幅相频谱等等.docx
- 网络营销策略-网络营销团队的建立.docx
- 电子商务示范企业申请报告.doc
- 淡雅灰低面风背景完整框架创业商业计划书PPT模板.pptx
- 计算模型与算法技术:10-Iterative Improvement.ppt
- 计算模型与算法技术:9-Greedy Technique.ppt
- 计算模型与算法技术:6-Transform-and-Conquer.ppt
- 云服务安全风险分析研究.pdf
- 软件工程笔记(完整版).doc
- 电子商务网项目实例规划书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论3