{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Redis实战

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Redis实战

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

当你需要以接近实时的速度访问快速变动的数据流时,Redis这样的键值数据库就是你的极好选择。通过接纳散列、字符串、列表等多种数据类型,Redis对键值对模式进行了扩展,它既提供了极其快速的内存数据集操作,又可以在运行时轻松地将这些数据持久化到磁盘上面。除此之外,Redis还是免费的、开源的。

本书对Redis本身以及它的键值对模型进行了介绍,读者将接触到包括缓存、分布式广告定向等实际使用案例,学到如何从小型的作业任务开始,扩展Redis以适应大规模的数据集,以及如何与其他传统的关系数据库或是其他NoSQL存储系统进行集成。有经验的开发者应该会对集群和服务器脚本编程等较为深入的内容感兴趣。

本书主要内容

全面介绍Redis

预处理实时数据

管理内存数据集

发布/订阅及配置

持久化到磁盘

本书面向熟悉数据库概念的开发者。阅读本书既不要求读者预先了解NoSQL数据库概念,也不要求读者有任何Redis使用经验。本书也适合具备编程能力的系统管理员阅读。

要下载本书代码可以访问manning.com/RedisinAction。

Content Description

本书深入浅出地介绍了Redis的5种数据类型,并通过多个实用示例展示了Redis的用法。除此之外,书中还讲述了Redis的优化方法以及扩展方法,是一本对于学习和使用 Redis 来说不可多得的参考书籍。

本书一共由三个部分组成。首部分对Redis进行了介绍,说明了Redis的基本使用方法、它拥有的5种数据结构以及操作这5种数据结构的命令,并讲解了如何使用Redis去构建文章展示网站、cookie、购物车、网页缓存、数据库行缓存等一系列程序。第二部分对Redis命令进行了更详细的介绍,并展示了如何使用Redis去构建更为复杂的辅助工具和应用程序,并在结尾展示了如何使用Redis去构建一个简单的社交网站。第三部分对Redis用户经常会遇到的一些问题进行了介绍,讲解了降低Redis内存占用的方法、扩展Redis性能的方法以及使用Lua语言进行脚本编程的方法。

Author Description

作者介绍

Josiah L. Carlson博士,既是一位经验丰富的数据库专家,也是一位活跃的Redis社区贡献者。


译者简介

黄健宏(huangz),男,1990年出生,目前是程序员、技术图书作者和译者。著有《Redis设计与实现》,翻译了《Redis命令参考》《Disque使用教程》等技术文档。想要了解更多关于黄健宏的信息,请访问他的个人网站huangz.me。

Comments

★“这本书对于Redis的生态系统非常有帮助。”

——摘自“Redis之父”Salvatore Sanfilippo为本书写的序


★“书中介绍的示例都来源于真实的使用案例,这是本书的一个主要优点。”

——Filippo Pacini,SG咨询公司


★“本书通过真实而全面的示例,帮助读者从新手成长为专家。”

——Felipe Gutierrez,VMware/Spring Source公司


★“这本书提供了深入分析以及富有洞察力的真实案例。”

——Bobby Abraham,Integri有限责任公司


★“此书自有黄金屋,此书自有颜如玉!”

——Leo Cassarani,Unboxed咨询公司

Catalogue

第一部分入门
第1章初识Redis2
1.1Redis简介3
1.1.1Redis与其他数据库和软件的对比3
1.1.2附加特性4
1.1.3使用Redis的理由5
1.2Redis数据结构简介6
1.2.1Redis中的字符串7
1.2.2Redis中的列表9
1.2.3Redis的集合10
1.2.4Redis的散列11
1.2.5Redis的有序集合12
1.3你好Redis13
1.3.1对文章进行投票15
1.3.2发布并获取文章17
1.3.3对文章进行分组19
1.4寻求帮助21
1.5小结21

第2章使用Redis构建Web应用23
2.1登录和cookie缓存24
2.2使用Redis实现购物车28
2.3网页缓存29
2.4数据行缓存30
2.5网页分析33
2.6小结34

第二部分核心概念
第3章Redis命令38
3.1字符串39
3.2列表42
3.3集合44
3.4散列46
3.5有序集合48
3.6发布与订阅52
3.7其他命令54
3.7.1排序54
3.7.2基本的Redis事务56
3.7.3键的过期时间58
3.8小结60

第4章数据安全与性能保障61
4.1持久化选项61
4.1.1快照持久化62
4.1.2AOF持久化66
4.1.3重写/压缩AOF文件67
4.2复制68
4.2.1配置Redis的配置选项69
4.2.2Redis复制的启动过程70
4.2.3主从链71
4.2.4检验磁盘写入72
4.3处理系统故障73
4.3.1验证快照文件和AOF文件74
4.3.2更换故障主服务器75
4.4Redis事务76
4.4.1定义用户信息和用户包裹77
4.4.2将物品放到市场上销售78
4.4.3购买物品80
4.5非事务型流水线82
4.6关于性能方面的注意事项85
4.7小结87

第5章使用Redis构建支持程序88
5.1使用Redis来记录日志88
5.1.1最新日志89
5.1.2常见日志90
5.2计数器和统计数据91
5.2.1将计数器存储到Redis里面91
5.2.2使用Redis存储统计数据96
5.2.3简化统计数据的记录与发现98
5.3查找IP所属城市以及国家100
5.3.1载入位置表格100
5.3.2查找IP所属城市102
5.4服务的发现与配置103
5.4.1使用Redis存储配置信息103
5.4.2为每个应用程序组件分别配置一个Redis服务器104
5.4.3自动Redis连接管理106
5.5小结107

第6章使用Redis构建应用程序组件109
6.1自动补全109
6.1.1自动补全最近联系人110
6.1.2通讯录自动补全112
6.2分布式锁115
6.2.1锁的重要性116
6.2.2简易锁118
6.2.3使用Redis构建锁119
6.2.4细粒度锁122
6.2.5带有超时限制特性的锁124
6.3计数信号量126
6.3.1构建基本的计数信号量126
6.3.2公平信号量128
6.3.3刷新信号量131
6.3.4消除竞争条件132
6.4任务队列133
6.4.1先进先出队列133
6.4.2延迟任务136
6.5消息拉取139
6.5.1单接收者消息的发送与订阅替代品140
6.5.2多接收者消息的发送与订阅替代品141
6.6使用Redis进行文件分发145
6.6.1根据地理位置聚合用户数据146
6.6.2发送日志文件148
6.6.3接收日志文件149
6.6.4处理日志文件150
6.7小结152

第7章基于搜索的应用程序153
7.1使用Redis进行搜索153
7.1.1基本搜索原理154
7.1.2对搜索结果进行排序160
7.2有序索引162
7.2.1使用有序集合对搜索结果进行排序162
7.2.2使用有序集合实现非数值排序164
7.3广告定向166
7.3.1什么是广告服务器?167
7.3.2对广告进行索引167
7.3.3执行广告定向操作170
7.3.4从用户行为中学习174
7.4职位搜索180
7.4.1逐个查找合适的职位180
7.4.2以搜索方式查找合适的职位181
7.5小结182

第8章构建简单的社交网站184
8.1用户和状态185
8.1.1用户信息185
8.1.2状态消息186
8.2主页时间线187
8.3关注者列表和正在关注列表188
8.4状态消息的发布与删除191
8.5流API194
8.5.1流API提供的数据195
8.5.2提供数据196
8.5.3对流消息进行过滤199
8.6小结205

第三部分进阶内容
第9章降低内存占用208
9.1短结构208
9.1.1压缩列表表示209
9.1.2集合的整数集合编码211
9.1.3长压缩列表和大整数集合带来的性能问题212
9.2分片结构214
9.2.1分片式散列215
9.2.2分片集合218
9.3打包存储二进制位和字节221
9.3.1决定被存储位置信息的格式221
9.3.2存储打包后的数据223
9.3.3对分片字符串进行聚合计算224
9.4小结226

第10章扩展Redis227
10.1扩展读性能227
10.2扩展写性能和内存容量230
10.2.1处理分片配置信息232
10.2.2创建分片服务器连接装饰器233
10.3扩展复杂的查询234
10.3.1扩展搜索查询量235
10.3.2扩展搜索索引大小235
10.3.3对社交网站进行扩展240
10.4小结247

第11章Redis的Lua脚本编程248
11.1在不编写C代码的情况下添加新功能248
11.1.1将Lua脚本载入Redis249
11.1.2创建新的状态消息251
11.2使用Lua重写锁和信号量254
11.2.1使用Lua实现锁的原因254
11.2.2重写锁实现255
11.2.3使用Lua实现计数信号量257
11.3移除WATCH/MULTI/EXEC事务258
11.3.1回顾群组自动补全程序259
11.3.2再次对物品买卖市场进行改进261
11.4使用Lua对列表进行分片263
11.4.1分片列表的构成263
11.4.2将元素推入分片列表265
11.4.3从分片里面里面弹出元素266
11.4.4对分片列表执行阻塞弹出操作267
11.5小结270

附录A快速安装指南271

附录B其他资源和参考资料279

Book Abstract

《Redis实战》:
要构建一个文章投票网站,我们首先要做的就是为了这个网站设置一些数值和限制条件:如果一篇文章获得了至少200张支持票(up vote),那么网站就认为这篇文章是一篇有趣的文章;假如这个网站每天发布1000篇文章,而其中的50篇符合网站对有趣文章的要求,那么网站要做的就是把这50篇文章放到文章列表前100位至少一天;另外,这个网站暂时不提供投反对票(down.vote)的功能。
为了产生一个能够随着时间流逝而不断减少的评分,程序需要根据文章的发布时间和当前时间来计算文章的评分,具体的计算方法为:将文章得到的支持票数量乘以一个常数,然后加上文章的发布时间,得出的结果就是文章的评分。
我们使用从UTC时区1970年1月1日到现在为止经过的秒数来计算文章的评分,这个值通常被称为Unix时间。之所以选择使用Unix时间,是因为在所有能够运行Redis的平台上面,使用编程语言获取这个值都是一件非常简单的事情。另外,计算评分时与支持票数量相乘的常量为432,这个常量是通过将一天的秒数(86400)除以文章展示一天所需的支持票数量(200)得出的:文章每获得一张支持票,程序就需要将文章的评分增加432分。
……

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book