作者:微信小助手
<p style="max-width: 100%;min-height: 1em;white-space: normal;text-align: center;overflow-wrap: break-word !important;box-sizing: border-box !important;" data-mpa-powered-by="yiban.io"><span style="max-width: 100%;color: rgb(136, 136, 136);font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;overflow-wrap: break-word !important;box-sizing: border-box !important;">点击蓝色“</span><span style="max-width: 100%;font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;color: rgb(0, 128, 255);overflow-wrap: break-word !important;box-sizing: border-box !important;">程序猿DD</span><span style="max-width: 100%;color: rgb(136, 136, 136);font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;overflow-wrap: break-word !important;box-sizing: border-box !important;">”关注我</span><br style="max-width: 100%;overflow-wrap: break-word !important;box-sizing: border-box !important;"></p> <p style="max-width: 100%;min-height: 1em;white-space: normal;text-align: center;overflow-wrap: break-word !important;box-sizing: border-box !important;"><span style="max-width: 100%;color: rgb(136, 136, 136);font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;overflow-wrap: break-word !important;box-sizing: border-box !important;">回复“</span><span style="max-width: 100%;font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;color: rgb(0, 128, 255);overflow-wrap: break-word !important;box-sizing: border-box !important;">资源</span><span style="max-width: 100%;color: rgb(136, 136, 136);font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;overflow-wrap: break-word !important;box-sizing: border-box !important;">”获取独家整理的学习资料!</span></p> <p style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;min-height: 1em;white-space: normal;text-align: center;overflow-wrap: break-word !important;box-sizing: border-box !important;"><span style="max-width: 100%;color: rgb(136, 136, 136);font-family: Georgia, "Times New Roman", Times, "Songti SC", serif;font-size: 14px;letter-spacing: 0.544px;overflow-wrap: break-word !important;box-sizing: border-box !important;"><img class="" data-backh="34" data-backw="540" data-ratio="0.0625" data-s="300,640" data-type="jpeg" data-w="640" width="100%" src="/upload/8c292e55ba5a23cb6ebc11f2a2c4fece.null" style="font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;overflow-wrap: break-word !important;box-sizing: border-box !important;visibility: visible !important;width: 654px !important;"></span></p> <p style="max-width: 100%;min-height: 1em;white-space: normal;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);text-align: left;overflow-wrap: break-word !important;box-sizing: border-box !important;"><span style="max-width: 100%;letter-spacing: 0.544px;color: rgb(178, 178, 178);font-family: Optima-Regular, PingFangTC-light;font-size: 13px;overflow-wrap: break-word !important;box-sizing: border-box !important;">作者 | 翟永超<br style="max-width: 100%;overflow-wrap: break-word !important;box-sizing: border-box !important;"></span></p> <section style="text-align: left;margin-bottom: 15px;max-width: 100%;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;box-sizing: border-box !important;"> <span style="max-width: 100%;letter-spacing: 0.544px;color: rgb(178, 178, 178);font-family: Optima-Regular, PingFangTC-light;font-size: 13px;overflow-wrap: break-word !important;box-sizing: border-box !important;">来源 |<span style="white-space: pre-line;"> didispace.com/spring-boot-learning-21-2-4/</span></span> </section> <section style="text-align: left;margin-bottom: 15px;max-width: 100%;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;box-sizing: border-box !important;"> <span style="max-width: 100%;letter-spacing: 0.544px;color: rgb(178, 178, 178);font-family: Optima-Regular, PingFangTC-light;font-size: 13px;overflow-wrap: break-word !important;box-sizing: border-box !important;"><span style="white-space: pre-line;"><img class="" data-ratio="0.625" src="/upload/f4a7d2e411ce0c95c6d3f951b95b2b83.jpg" data-type="jpeg" data-w="1440"></span></span> </section> <p style="margin-bottom: 16px;color: rgb(36, 41, 46);font-family: Roboto, sans-serif;font-size: 14px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">之前通过Spring Boot 2.x基础教程:使用Swagger2构建强大的API文档一文,我们学习了如何使用Swagger为Spring Boot项目自动生成API文档,有不少用户留言问了关于文档内容的组织以及排序问题。所以,就特别开一篇详细说说Swagger中文档内容如何来组织以及其中各个元素如何控制前后顺序的具体配置方法。</p> <h2 style="margin-top: 24px;margin-bottom: 16px;font-weight: 600;line-height: 1.25;font-size: 1.5em;padding-bottom: 0.3em;border-bottom: 1px solid rgb(187, 187, 187);color: rgb(36, 41, 46);font-family: Roboto, sans-serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">接口的分组</h2> <p style="margin-bottom: 16px;color: rgb(36, 41, 46);font-family: Roboto, sans-serif;font-size: 14px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">我们在Spring Boot中定义各个接口是以<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Controller</code>作为第一级维度来进行组织的,<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Controller</code>与具体接口之间的关系是一对多的关系。我们可以将同属一个模块的接口定义在一个<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Controller</code>里。默认情况下,Swagger是以<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Controller</code>为单位,对接口进行分组管理的。这个分组的元素在Swagger中称为<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Tag</code>,但是这里的<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Tag</code>与接口的关系并不是一对多的,它支持更丰富的多对多关系。</p> <h3 style="margin-top: 24px;margin-bottom: 16px;font-weight: 600;line-height: 1.25;font-size: 1.25em;color: rgb(36, 41, 46);font-family: Roboto, sans-serif;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">默认分组</h3> <p style="margin-bottom: 16px;color: rgb(36, 41, 46);font-family: Roboto, sans-serif;font-size: 14px;text-align: left;white-space: normal;background-color: rgb(255, 255, 255);">首先,我们通过一个简单的例子,来看一下默认情况,Swagger是如何根据Controller来组织Tag与接口关系的。定义两个<code style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(232, 62, 140);word-break: break-word;padding: 0.2em 0.4em;background-color: rgb(238, 238, 238);border-radius: 0px 0px 5px 5px;">Controller</code>,分别负责教师管理与学生管理接口,比如下面这样:</p> <pre style="font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;font-size: 14px;margin-bottom: 16px;overflow: auto;color: wheat;padding: 10px;background-color: rgb(238, 238, 238);overflow-wrap: normal;box-shadow: rgb(132, 161, 168) 0px 5px 5px;text-align: left;"><code class="lang-java hljs" style="font-family: PingFangSC-Light, SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;color: rgb(88, 180, 217);word-break: normal;display: inline;overflow: visible;background: 0px 0px;border-radius: 0px 0px 5px 5px;border-width: 0px;border-style: initial;border-color: initial;overflow-wrap: normal;line-height: inherit;"><span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@RestController</span></span><br><span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@RequestMapping</span>(value = <span class="hljs-meta-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"/teacher"</span></span>)</span><br><span class="hljs-keyword" style="color: rgb(166, 38, 164);">static</span> <span class="hljs-class"><span class="hljs-keyword" style="color: rgb(166, 38, 164);"><span class="hljs-class"><span class="hljs-keyword">class</span></span></span><span class="hljs-class"> </span><span class="hljs-title" style="color: rgb(193, 132, 1);"><span class="hljs-class"><span class="hljs-title">TeacherController</span></span></span><span class="hljs-class"> </span></span>{<br><br> <span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@GetMapping</span>(<span class="hljs-meta-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"/xxx"</span></span>)</span><br> <span class="hljs-keyword" style="color: rgb(166, 38, 164);"><span class="hljs-function"><span class="hljs-keyword">public</span></span></span><span class="hljs-function"> String <span class="hljs-title" style="color: rgb(64, 120, 242);">xxx</span><span class="hljs-params">()</span> </span>{<br> <span class="hljs-keyword" style="color: rgb(166, 38, 164);"><span class="hljs-keyword">return</span></span> <span class="hljs-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"xxx"</span></span>;<br> }<br><br>}<br><br><span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@RestController</span></span><br><span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@RequestMapping</span>(value = <span class="hljs-meta-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"/student"</span></span>)</span><br><span class="hljs-keyword" style="color: rgb(166, 38, 164);">static</span> <span class="hljs-class"><span class="hljs-keyword" style="color: rgb(166, 38, 164);"><span class="hljs-class"><span class="hljs-keyword">class</span></span></span><span class="hljs-class"> </span><span class="hljs-title" style="color: rgb(193, 132, 1);"><span class="hljs-class"><span class="hljs-title">StudentController</span></span></span><span class="hljs-class"> </span></span>{<br><br> <span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@ApiOperation</span>(<span class="hljs-meta-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"获取学生清单"</span></span>)</span><br> <span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@GetMapping</span>(<span class="hljs-meta-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"/list"</span></span>)</span><br> <span class="hljs-keyword" style="color: rgb(166, 38, 164);"><span class="hljs-function"><span class="hljs-keyword">public</span></span></span><span class="hljs-function"> String <span class="hljs-title" style="color: rgb(64, 120, 242);">bbb</span><span class="hljs-params">()</span> </span>{<br> <span class="hljs-keyword" style="color: rgb(166, 38, 164);"><span class="hljs-keyword">return</span></span> <span class="hljs-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"bbb"</span></span>;<br> }<br><br> <span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@ApiOperation</span>(<span class="hljs-meta-string" style="color: rgb(80, 161, 79);"><span class="hljs-string">"获取教某个学生的老师清单"</span></span>)</span><br> <span class="hljs-meta" style="color: rgb(64, 120, 242);"><span class="hljs-meta">@GetMapping</span>(<span class="hljs-meta-string" style="color: rgb
作者:じ☆ve宝贝
我们会经常遇到一些linux系统基础操作比较耗时的任务,比如编译一个大型环境,删除或移动一些文件,又或者是mysql导入一个大型文件比较耗时,如果一个终端执行比较久因为断电退出、超时退出或者误操作,都会导致这些命令终止。又或者我们还需要做一些其他事情,总不能一直等这个操作完成,那么screen就可以完美解决现在的问题了。 简单用法记录如下: 1,新建一个screen。 从linux的ssh终端上直接执行 screen -S abc (abc为给这个终端起的名字,以后可以用到,方便多个screen执行不知道每个是干啥的) 比如我们建立screen -S tongji 这个终端是一个mysql恢复,是一个sql命令导入,过程可能需要一个小时左右。 建立完以后我们就可以关掉这个页面去干其他事情去了。后边只需要进去查看这个操作是否完成就行。 2,查看screen 对于已经建立的screen,我们需要进去查看的时候,需要执行如下操作。 查看screen: ``` root@iZ23gjmzn3tZ:/# screen -ls There are screens on: 10867.mysqldump (08/05/2016 05:09:31 PM) (Detached) 8074.tongji (08/05/2016 09:35:01 AM) (Attached) 2 Sockets in /var/run/screen/S-root. ``` 进入screen -r tongji 或者screen -r 8074 都可以。 ``` root@iZ23gjmzn3tZ:/# screen -r tongji ``` 进入终端显示如下: ``` Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) MySQL [screen_test] ``` 可见这个导入已经恢复完成,我们完全不需要担心中间ssh的这个终端断掉或者是其他方式碰到,后台就给你无人值守执行了。 3,退出一个screen的方法,这里简单总结两个。 方法1:screen -S abc -X quit (abc为当时起的名字) 方法2:screen -r abc 重新激活新的screen,执行exit退出。 更为详细操作,请参考资料: Linux虚拟终端命令Screen用法详解,地址太长,请点击:Screen用法详解 Linux下Screen的常用命令:http://www.linuxidc.com/Linux/2012-07/65358.htm Screen会话命令:http://www.cnblogs.com/ywl925/p/3604530.html
作者:じ☆ve宝贝
lombok 注解: lombok 提供的注解不多,可以参考官方视频的讲解和官方文档。 Lombok 注解在线帮助文档:http://projectlombok.org/features/index. 下面介绍几个我常用的 lombok 注解: @Data :注解在类上;提供类所有属性的 getting 和 setting 方法,此外还提供了equals、canEqual、hashCode、toString 方法 @Setter:注解在属性上;为属性提供 setting 方法 @Getter:注解在属性上;为属性提供 getting 方法 @Log4j :注解在类上;为类提供一个 属性名为log 的 log4j 日志对象 @NoArgsConstructor:注解在类上;为类提供一个无参的构造方法 @AllArgsConstructor:注解在类上;为类提供一个全参的构造方法 1、下载地址:https://projectlombok.org/download #### 安装步骤: 1.下载lombok.jar包 2.将lombok.jar包复制到myeclipse.ini/eclipse.ini所在文件目录 3.打开myeclipse.ini/eclipse.ini,在最后添加以下代码并保存: -javaagent:lombok.jar 4.重启myeclipse/eclipse. 5.project==>clean 清理项目
作者:微信小助手
<section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">开篇</span></strong> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">同一个用户并发扣款时,有一定概率出现数据不一致,<strong>可以使用CAS乐观锁</strong>的方式,在不降低吞吐量,保证数据的一致性:</span> </section> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">UPDATE t_yue SET money=$new_money<br></span></em></span></p> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">WHERE uid=$uid AND </span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">money=$old_money</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">;</span></em></span></p> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">更详细的描述,详见《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962738&idx=1&sn=d2d91a380bad06af9f7b9f7a80db26b3&chksm=bd2d08ae8a5a81b8a7f044af52c5e6e77ec3df2bb4a9c91cd450c3fd932e8dade56afb09f784&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">并发扣款,如何保证数据的一致性?</a>》。</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">不能采用直接扣减的方式</span></strong> <span style="font-size: 15px;letter-spacing: 1px;">:</span> </section> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">UPDATE t_yue SET </span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">money=money-$diff</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;"> WHERE uid=$uid;</span></em></span></p> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">更详细的描述,详见《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962770&idx=1&sn=94efc914b0e7d6a74948926a3ea7e9c6&chksm=bd2d084e8a5a8158e7e73d3b917e5189127087a45d78b81ce96db48e6ae2e89cd0bd11c8f301&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">并发扣款一致性,幂等性问题</a>》。</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">当然,更通用的方式,<strong>可以使用版本号</strong>来实现CAS乐观锁:</span> </section> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">UPDATE t_yue SET money=$new_money,</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">ver=$ver_new</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;"> <br>WHERE uid=$uid AND </span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">ver=$ver_old</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">;</span></em></span></p> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">更详细的描述,详见《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962761&idx=1&sn=11513a9e34bf77b4545ecdc289f4c8fd&chksm=bd2d08558a5a8143ce15fbd9722fbcc42593b55480ca5eba7b19b2911763bb15bde65e9a2c4b&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">并发扣款一致性优化,CAS下ABA问题</a>》。</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">对于这个CAS乐观锁方案,很有朋友有疑问:</span> <strong><span style="font-size: 15px;letter-spacing: 1px;">当并发量高时,版本号比对会导致大量的更新失败,这个方案不适用于高并发场景吗?</span><span style="font-size: 15px;letter-spacing: 1px;"></span></strong> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">究竟是不是这样呢?</span> <span style="font-size: 15px;letter-spacing: 1px;">大家对高并发是不是有什么误解呢?</span> <span style="font-size: 15px;letter-spacing: 1px;">今天来聊一聊这个话题。<br><br>先分析三个业务场景。</span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">一、QQ</span></strong> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">QQ的一些核心业务有:</span> </section> <ul style="list-style-type: disc;" class=" list-paddingleft-2"> <li><p><span style="font-size: 15px;letter-spacing: 1px;">个人:</span><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">user(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">uid</span></em></span><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">, user_info, …)</span></em></span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;">好友:</span><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">user_friends(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">uid</span></em></span><span style="font-size: 12px;"><em><span style="font-size: 12px;letter-spacing: 1px;">, friend_id, …)</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;">加入的群:</span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">user_groups(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">uid</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">, group_id, …)</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;">群:</span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">group(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">gid</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">, group_info, …)</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;">群成员:</span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">group_members(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">gid</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">, uid, …)</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;">个人消息:</span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">msgs_user(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">msg_id</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">, uid, …)</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;">群消息:</span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">msgs_group(</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">msg_id</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">, gid, …)</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p></li> </ul> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">这些信息的读写有一个特点,都会带上uid/gid/msgid属性。</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">例如,<strong>拉取好友列表</strong>:</span> </section> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">select friend_id from user_friends where </span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">uid=$uid</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">;</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">在用户量很大,并发量很大时,</span> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">不同用户/群/消息数据的读写并没有锁冲突</span> <span style="font-size: 15px;letter-spacing: 1px;">。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">10W个用户同时读写,彼此没有锁冲突。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">只有当,同一个用户,很短的时间内,有大量并发时,才可能存在锁冲突。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:例如,</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">1个用户,1秒钟读写1W次。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">二、微博</span></strong> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">微博的核心业务是feed流:</span> </section> <ul style="list-style-type: disc;" class=" list-paddingleft-2"> <li><p><span style="font-size: 15px;letter-spacing: 1px;"></span><span style="font-size: 15px;letter-spacing: 1px;">发消息,写操作</span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;"></span><span style="font-size: 15px;letter-spacing: 1px;">刷消息,读操作</span></p></li> </ul> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">微博业务显然是</span> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">读多写少</span> <span style="font-size: 15px;letter-spacing: 1px;">的,在用户刷消息时,</span> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">自己feed流里的消息,是由别人发出的</span> <span style="font-size: 15px;letter-spacing: 1px;">。</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">查看自己主页feed流</span></strong> <span style="font-size: 15px;letter-spacing: 1px;">,最朴素的实现方法是:</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">(1) 拉取自己关注的用户id_list;</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">(2) 拉取这些用户最近N条消息;</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">(3) 将这N*id_list条消息排序;</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">(4) 返回第一页消息,得到自己主页feed流;</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">这里不展开读扩散,写扩散,详见《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651961939&idx=1&sn=31a0a4b45a25befbde5b05fe0ba574f6&chksm=bd2d0f8f8a5a86994f983eb45873e06145d5ebbafedec9adf039aabef9cef70700b87e0c5aa8&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">读扩散?写扩散?</a>》。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">在用户量很大,并发量很大时,</span> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">会有一定数据的读写锁冲突</span> <span style="font-size: 15px;letter-spacing: 1px;">。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">不像QQ,基本是读写自己的数据,微博要写自己的数据,读别人的数据。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">三、12306</span></strong> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">12306的核心业务是:</span> </section> <ul style="list-style-type: disc;" class=" list-paddingleft-2"> <li><p><span style="font-size: 15px;letter-spacing: 1px;"></span><span style="font-size: 15px;letter-spacing: 1px;">查票,读操作</span></p></li> <li><p><span style="font-size: 15px;letter-spacing: 1px;"></span><span style="font-size: 15px;letter-spacing: 1px;">买票,</span><span style="font-size: 15px;letter-spacing: 1px;">写操作</span></p></li> </ul> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"></section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">stock(id, num) // 某一列车有多少张余票</span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">在用户量很大,并发量很大时,</span> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">有极大的锁冲突</span> <span style="font-size: 15px;letter-spacing: 1px;">。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">这个业务,数据量并不大。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">这类“秒杀”业务,如果不做特殊的优化,</span> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">数据库很容易死锁卡死</span> <span style="font-size: 15px;letter-spacing: 1px;">,没有任何人能买票成功。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">要做什么特殊的优化呢?</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">收尾</span></strong> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">QQ,微博、12306,同样是高并发业务,就数据存储锁冲突来说,各自的难度,数据不一致的概率是不同的。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">你不能说,QQ不是高并发业务吧。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">回到开篇,使用CAS乐观锁进库存扣减:</span> </section> <p style="line-height: normal;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;"><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">UPDATE t_yue SET money=$new_money,</span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">ver=$ver_new</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;"> <br>WHERE uid=$uid AND </span></em></span><span style="font-size: 12px;color: rgb(255, 76, 0);"><em><span style="font-size: 12px;letter-spacing: 1px;">ver=$ver_old</span></em></span><span style="font-size: 12px;"><em><span style="letter-spacing: 1px;">;</span></em></span></span></em></span><span style="font-size: 15px;letter-spacing: 1px;"></span></p> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 76, 0);">只要有uid这个过滤属性,即使10W用户同时扣款,也不容易出现数据不一致</span> <span style="font-size: 15px;letter-spacing: 1px;">。</span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;">只有当同一个用户,同一秒钟,有大量扣减时,才有一定几率会冲撞,但也不会导致数据不一致。</span> </section> <section style="line-height: 1.75em;"> <span style="color: rgb(0, 82, 255);"><em><span style="font-size: 15px;letter-spacing: 1px;">画外音:</span></em><em><span style="font-size: 15px;letter-spacing: 1px;">有一位很可爱的水友,说万一PC端和APP端同时下单怎么办。</span></em></span> <span style="font-size: 15px;letter-spacing: 1px;"></span> </section> <section style="line-height: 1.75em;"> <span style="font-size: 15px;letter-spacing: 1px;"> </span> </section> <section style="line-height: 1.75em;"> <strong><span style="font-size: 15px;letter-spacing: 1px;">结论</span></strong> <span style="font-size: 15px;letter-spacing: 1px;"><br></span> <span style="font-size: 15px;letter-spacing: 1px;">高并发的扣款场景,可以使用CAS乐观锁,采用select&set方式进行扣款,既能够保证吞吐量,又能够保证一致性。</span> </section> <section style="text-align: center;color: rgb(51, 51, 51);line-height: normal;clear: both;box-sizing: border-box;background-color: rgb(255, 255, 255);"> <span style="margin: 0px;padding: 0px;letter-spacing: 1px;font-size: 15px;word-wrap: break-word;max-width: 100%;box-sizing: border-box;"><strong style="box-sizing: border-box;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;max-width: 100%;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;word-wrap: break-word;"><img style="box-sizing: border-box;margin: 0px;max-width: 677px;padding: 0px;visibility: visible !important;overflow-wrap: break-word;width: 130px !important;height: auto !important;" data-ratio="1" data-type="jpeg" data-w="250" data-s="300,640" class="" src="/upload/7ddc9700032e2c5cee163f1f1a37b46c.jpg" width="auto"></strong></span> </section> <section style="text-align: center;color: rgb(51, 51, 51);line-height: normal;clear: both;box-sizing: border-box;background-color: rgb(255, 255, 255);"> <span style="margin: 0px;padding: 0px;letter-spacing: 1px;font-size: 12px;word-wrap: break-word;max-width: 100%;box-sizing: border-box;"><strong style="box-sizing: border-box;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;max-width: 100%;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;word-wrap: break-word;"><strong style="box-sizing: border-box;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;max-width: 100%;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;word-wrap: break-word;">架构师之路</strong>-分享技术思路</strong><strong style="box-sizing: border-box;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;max-width: 100%;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;word-wrap: break-word;"></strong><br style="box-sizing: border-box;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;margin-top: 0px;max-width: 100%;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;padding-top: 0px;word-wrap: break-word;"></span> </section> <section style="margin: 0px;padding: 0px;text-align: left;color: rgb(51, 51, 51);text-transform: none;line-height: 1.75em;text-indent: 0px;letter-spacing: 0.54px;clear: both;font-size: 17px;font-style: normal;font-variant: normal;font-weight: 400;text-decoration: none;word-spacing: 0px;white-space: normal;word-wrap: break-word;min-height: 17px;max-width: 677px;box-sizing: border-box;orphans: 2;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);"> <span style="margin: 0px;padding: 0px;letter-spacing: 1px;font-size: 15px;word-wrap: break-word;max-width: 100%;box-sizing: border-box;">相关文章:</span> </section> <section style="margin: 0px;padding: 0px;text-align: left;color: rgb(51, 51, 51);text-transform: none;line-height: 1.75em;text-indent: 0px;letter-spacing: 0.54px;clear: both;font-size: 17px;font-style: normal;font-variant: normal;font-weight: 400;text-decoration: none;word-spacing: 0px;white-space: normal;word-wrap: break-word;min-height: 17px;max-width: 677px;box-sizing: border-box;orphans: 2;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);"> <span style="margin: 0px;padding: 0px;letter-spacing: 1px;font-size: 15px;word-wrap: break-word;max-width: 100%;box-sizing: border-box;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962738&idx=1&sn=d2d91a380bad06af9f7b9f7a80db26b3&chksm=bd2d08ae8a5a81b8a7f044af52c5e6e77ec3df2bb4a9c91cd450c3fd932e8dade56afb09f784&scene=21#wechat_redirect" target="_blank" data-linktype="2" data-itemshowtype="0">并发扣款,如何保证数据的一致性?</a>》<br>《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962761&idx=1&sn=11513a9e34bf77b4545ecdc289f4c8fd&chksm=bd2d08558a5a8143ce15fbd9722fbcc42593b55480ca5eba7b19b2911763bb15bde65e9a2c4b&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">并发扣款一致性优化,CAS下ABA问题</a>》<br><span style="font-size: 15px;letter-spacing: 1px;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651962770&idx=1&sn=94efc914b0e7d6a74948926a3ea7e9c6&chksm=bd2d084e8a5a8158e7e73d3b917e5189127087a45d78b81ce96db48e6ae2e89cd0bd11c8f301&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">并发扣款一致性,幂等性问题</a>》<br>《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651961939&idx=1&sn=31a0a4b45a25befbde5b05fe0ba574f6&chksm=bd2d0f8f8a5a86994f983eb45873e06145d5ebbafedec9adf039aabef9cef70700b87e0c5aa8&scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2">读扩散?写扩散?</a>》</span></span> <br> </section> <p><span style="text-align: justify;color: rgb(51, 51, 51);text-transform: none;text-indent: 0px;letter-spacing: 1px;font-family: "mp-quote",-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;text-decoration: none;word-spacing: 0px;display: inline !important;orphans: 2;float: none;-webkit-text-stroke-width: 0px;background-color: transparent;"><br></span></p> <p><span style="text-align: justify;color: rgb(51, 51, 51);text-transform: none;text-indent: 0px;letter-spacing: 1px;font-family: "mp-quote",-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;text-decoration: none;word-spacing: 0px;display: inline !important;orphans: 2;float: none;-webkit-text-stroke-width: 0px;background-color: transparent;">任何脱离业务的架构设计,都是耍流氓</span><span style="text-align: justify;color: rgb(51, 51, 51);text-transform: none;text-indent: 0px;letter-spacing: 1px;font-family: "mp-quote",-apple-system-font,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei",Arial,sans-serif;font-size: 15px;font-style: normal;font-variant: normal;font-weight: 400;text-decoration: none;word-spacing: 0px;display: inline !important;orphans: 2;float: none;-webkit-text-stroke-width: 0px;background-color: transparent;">。</span></p>
作者:微信小助手
<section powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"> <section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;transform: translate3d(0px, 0px, 0px);text-align: center;overflow-wrap: break-word !important;"> <section style="max-width: 100%;box-sizing: border-box;display: inline-block;vertical-align: middle;width: 406.188px;overflow-wrap: break-word !important;"> <section powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"> <section style="box-sizing: border-box;font-size: 16px;"> <section style="box-sizing: border-box;" powered-by="xiumi.us"> <section style="transform: translate3d(0px, 0px, 0px);-webkit-transform: translate3d(0px, 0px, 0px);-moz-transform: translate3d(0px, 0px, 0px);-o-transform: translate3d(0px, 0px, 0px);text-align: center;margin: 10px 0%;box-sizing: border-box;"> <section style="display: inline-block;vertical-align: middle;width: 60%;box-sizing: border-box;"> <section style="box-sizing: border-box;" powered-by="xiumi.us"> <p style="text-align: center;"><br></p> <p style="text-align: center;"><br></p> </section> </section> <section style="display: inline-block;vertical-align: middle;width: 12%;border-left: 1px solid rgb(209, 222, 203);border-bottom-left-radius: 0px;border-right: 1px solid rgb(209, 222, 203);border-top-right-radius: 0px;border-top-width: 0px;box-sizing: border-box;"> <section style="box-sizing: border-box;" powered-by="xiumi.us"> <section style="box-sizing: border-box;"> <section style="color: rgb(173, 158, 159);box-sizing: border-box;"> <p style="box-sizing: border-box;"><strong style="box-sizing: border-box;"></strong></p> </section> </section> </section> </section> </section> </section> </section> <section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"> <span style="font-size: 14px;background-color: rgb(255, 255, 255);letter-spacing: 0.544px;color: rgb(15, 15, 15);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;">本文转载自公众号:Java极客技术,作者:乔二爷<br></span> </section> <section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"></section> <section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"></section> <section style="margin-top: 10px;margin-bottom: 10px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"> <span style="font-size: 14px;background-color: rgb(255, 255, 255);letter-spacing: 0.544px;color: rgb(15, 15, 15);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;">公众号后台回复“</span> <span style="font-size: 14px;background-color: rgb(255, 255, 255);letter-spacing: 0.544px;font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;max-width: 100%;box-sizing: border-box;color: rgb(255, 76, 0);overflow-wrap: break-word !important;">面试突击</span> <span style="font-size: 14px;background-color: rgb(255, 255, 255);letter-spacing: 0.544px;color: rgb(15, 15, 15);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;">”,获得Java面试突击第三版!</span> <br> </section> </section> </section> </section> </section> <section powered-by="xiumi.us" style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"> <section style="max-width: 100%;box-sizing: border-box;overflow-wrap: break-word !important;"> <section style="max-width: 100%;box-sizing: border-box;font-size: 14px;text-align: center;line-height: 1.8;color: rgb(15, 15, 15);overflow-wrap: break-word !important;"> <hr style="border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);"> <p style="max-width: 100%;box-sizing: border-box;min-height: 1em;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;"><span style="font-size: 14px;"></span><br></p> <p style="max-width: 100%;box-sizing: border-box;min-height: 1em;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;text-align: center;"><span style="font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 16px;text-align: left;color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;">4月初在面试一家互联网公司的过程中就被问到了分布式事物问题。</span></strong></span></strong><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;">我又一次在没有好好整理的问题上吃了亏。记录一下!!!</span></strong></span></strong></span></p> <p style="max-width: 100%;box-sizing: border-box;min-height: 1em;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);overflow-wrap: break-word !important;text-align: center;"><strong style="color: rgb(136, 136, 136);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-size: 16px;text-align: left;letter-spacing: 0.544px;"><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br></span></strong></span></strong></p> </section> </section> </section> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: center;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">背景</span></strong></span></strong></span><span style="text-align: center;font-size: 14px;"></span></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: center;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><br></span></strong></span></strong></span></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">四月初,去面试了本市的一家之前在做办公室无人货架的公司,虽然他们现在在面临着转型,但是对于我这种想从传统企业往互联网行业走的孩子来说,还是比较有吸引力的。</span></strong></span></strong></span></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">在面试过程中就提到了分布式事物问题。</span></strong></span></strong></span><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">我又一次在没有好好整理的问题上吃了亏,记录一下,还是</span></strong></span></strong></span><span style="color: rgb(255, 76, 0);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">长记性 !</span></strong></span></strong></span><span style="color: rgb(255, 76, 0);"><strong><span style="color: rgb(255, 76, 0);font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="color: rgb(255, 76, 0);max-width: 100%;font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">!</span></strong></span></strong></span><span style="color: rgb(255, 76, 0);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">!</span></strong></span></strong></span></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><strong style="color: rgb(136, 136, 136);font-size: 22.4px;"><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;box-sizing: border-box !important;overflow-wrap: break-word !important;">先看面试过程</span></strong></span></strong></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">面试官先是在纸上先画了这样一张图:</span></strong></span></strong></span></p> <p style="text-align: center;"><img class="rich_pages" data-copyright="0" data-ratio="0.3650485436893204" data-s="300,640" src="/upload/a865aa7593993a635cb89281f78963dd.png" data-type="png" data-w="1030" style=""></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">让我看这张图按照上面的流程走,有没有什么问题?</span></strong></span></strong></span><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">面试官并没有直接说出来这里面会有分布式事物的问题,而是让我来告诉他,这就是</span></strong></span></strong></span><span style="color: rgb(255, 76, 0);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">面试套路</span></strong></span></strong></span><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">呀。</span></strong></span></strong></span><br></p> <p style="box-sizing: border-box;margin: 10px;font-size: 16px;white-space: normal;text-align: left;color: rgb(63, 63, 63);line-height: 1.6;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;"><span style="color: rgb(136, 136, 136);"><strong><span style="font-size: 14px;"><strong style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;color: rgb(85, 85, 85);font-family: Lato, "PingFang SC", "Microsoft YaHei", sans-serif;font-size: 14px;box-sizing: border-box !important;overflow-wrap: break-word !important;">我回答了这中间可能存在分布式事物的问题,当步骤2在调用 B 系统时,可能存在B 系统处理完成后,在响应的时
作者:じ☆ve宝贝
1.我们打开dubbo的jar包,我们可以在META-INF下看到dubbo.xsd 虽然启动没有问题,但xml验证Failed to read schema document 可以通过eclipse 手动添加schema文件来解决这个问题,如图:  保存。。在xml文件右键validate ok解决了。
作者:じ☆ve宝贝
## 微视无水印下载Java源码 > 前段时间给大家分享的了抖音无水印下载的Java源码,近日有时间,抓了一下微视的无水印地址,让大家可以享受高清无水印原视频。 ## pom.xml ``` <dependency> <groupId>com.jfinal</groupId> <artifactId>jfinal</artifactId> <version>2.2</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.47</version> </dependency> ``` ## 解析url ``` package cn.studyjava.weishi; /** * Hello world! * */ public class App { public static void main(String[] args) { //@喵大仙带你停药带你菲:‘才华’的重要性 >>https://h5.qzone.qq.com/weishi/feed/XnRuSSdlBeNy01db/wsfeed?_proxy=1&_wv=1&id=XnRuSSdlBeNy01db String wsId = "XnRuSSdlBeNy01db"; String post = HttpKit.post("https://h5.qzone.qq.com/webapp/json/weishi/WSH5GetPlayPage?t=0.4185745904612037&g_tk=", "feedid="+wsId+""); JSONObject res = JSON.parseObject(post); if(0 == res.getIntValue("ret")){ JSONObject data = res.getJSONObject("data"); JSONArray feeds = data.getJSONArray("feeds"); JSONObject feed = feeds.getJSONObject(0); map.put("code", "0"); map.put("msg", "ok"); map.put("url", feed.getString("video_url")); }else{ map.put("code", "1"); map.put("msg", res.getString("msg")); } System.out.println(map.get("url")); } } ``` ## [抖音、微视无水印在线下载](https://www.studyjava.cn/douyin) ## 抖音、微视无水印在线下载(小程序,可以直接保存到相册哦) 
作者:じ☆ve宝贝
## 1.生成ssh需要的key  保存文件是两个,一个id_rsa是私钥,另一个id_rsa.pub是公钥。(该处需要记录文件保存的路径) ## 2.拷贝公钥到服务器 根据上面保存的路径打开id_rsa.pub,拷贝当中的内容打开gitlab  ## 3.将id_rsa.pub公钥内容粘贴到此处  ## 4.拷贝项目地址  ## 5.使用eclipse下载gitlab项目  ## 6.下载  一直next后选择文件保存目录finish后就好了 ** 问题:有时会出现生成的key文件不能正常使用,在连接服务时会问几次密码后中断,可以尝试重启eclipse**
作者:じ☆ve宝贝
## 15.观察者模式(Observer) 包括这个模式在内的接下来的四个模式,都是类和类之间的关系,不涉及到继承,学的时候应该记得归纳。观察者模式很好理解,类似于邮件订阅和RSS订阅,当我们浏览一些博客或wiki时,经常会看到RSS图标,就这的意思是,当你订阅了该文章,如果后续有更新,会及时通知你。其实,简单来讲就一句话:当一个对象变化时,其它依赖该对象的对象都会收到通知,并且随着变化!对象之间是一种一对多的关系。先来看看关系图:  我解释下这些类的作用:MySubject类就是我们的主对象,Observer1和Observer2是依赖于MySubject的对象,当MySubject变化时,Observer1和Observer2必然变化。AbstractSubject类中定义着需要监控的对象列表,可以对其进行修改:增加或删除被监控对象,且当MySubject变化时,负责通知在列表内存在的对象。我们看实现代码: 一个Observer接口: ``` public interface Observer { public void update(); } ``` 两个实现类: ``` public class Observer1 implements Observer { @Override public void update() { System.out.println("observer1 has received!"); } } ``` ``` public class Observer2 implements Observer { @Override public void update() { System.out.println("observer2 has received!"); } } ``` Subject接口及实现类: ``` public interface Subject { /*增加观察者*/ public void add(Observer observer); /*删除观察者*/ public void del(Observer observer); /*通知所有的观察者*/ public void notifyObservers(); /*自身的操作*/ public void operation(); } ``` ``` public abstract class AbstractSubject implements Subject { private Vector<Observer> vector = new Vector<Observer>(); @Override public void add(Observer observer) { vector.add(observer); } @Override public void del(Observer observer) { vector.remove(observer); } @Override public void notifyObservers() { Enumeration<Observer> enumo = vector.elements(); while(enumo.hasMoreElements()){ enumo.nextElement().update(); } } } ``` ``` public class MySubject extends AbstractSubject { @Override public void operation() { System.out.println("update self!"); notifyObservers(); } } ``` 测试类: ``` public class ObserverTest { public static void main(String[] args) { Subject sub = new MySubject(); sub.add(new Observer1()); sub.add(new Observer2()); sub.operation(); } } ``` 输出: update self! observer1 has received! observer2 has received! 这些东西,其实不难,只是有些抽象,不太容易整体理解,建议读者:根据关系图,新建项目,自己写代码(或者参考我的代码),按照总体思路走一遍,这样才能体会它的思想,理解起来容易!
作者:微信小助手
<blockquote> <p><span style="color: rgb(178, 178, 178);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 14px;letter-spacing: 1px;text-align: justify;background-color: rgb(255, 255, 255);">搞架构的人,Google的论文是必看的,但好像大家都不愿意去啃英文论文。故把自己的读书笔记,加入自己的思考,分享给大家。</span></p> </blockquote> <p><span style="font-size: 14px;letter-spacing: 1px;"><br></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">第三部分,Google BigTable。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"><br></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">BigTable,很多人对它耳熟能详,但它究竟解决什么问题呢?这是今天要聊的话题。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">什么是BigTable?</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">Google BigTable是一个分布式,结构化数据的</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">存储系统</span><span style="font-size: 14px;letter-spacing: 1px;">,它用来存储海量数据。该系统用来满足“</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">大数据量、高吞吐量、快速响应</span><span style="font-size: 14px;letter-spacing: 1px;">”等不同应用场景下的存储需求。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:本质上,BigTable是一个存储系统。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">有BigTable之前,Google面临什么问题?</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">Google并不是一群人坐在办公室开会,想出来的系统,Google面临着很实际的业务问题。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">很多公司的基础架构部,是坐在办公室开会,想出来的东西,然后强推业务线使用;</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">脱离业务的技术,都是耍流氓。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">典型场景一:网页存储</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">Google每天要抓取很多网页:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><span style="font-size: 14px;letter-spacing: 1px;">新出现的网页,<strong>新URL</strong></span></p></li> <li><p><span style="font-size: 14px;letter-spacing: 1px;">旧网页,<strong>旧URL</strong></span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">对一个已抓取的网页,旧URL为啥要反复抓取?</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">因为,</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">网页会更新</span><span style="font-size: 14px;letter-spacing: 1px;">,例如新浪首页:</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">sina.com.cn/index.html</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">URL虽然没有变,但依然会抓取。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:我去,相当于,被抓取的URL集合,只会无限增大,趋近无穷,这里面的技术难题,不知道大家感不感兴趣?</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">这里,对于<strong>存储系统的需求</strong>,是要存储:</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">不同URL,不同时间Time,的内容Content</span><span style="font-size: 14px;letter-spacing: 1px;">。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:URL+”Content”+Time => Binary。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">网页的实际内容Binary,是Spider抓取出来的。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">典型场景二:Google Analytics</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">Google Analytics要给站长展示其网站的流量PV,独立用户数UV,典型访问路径等,以帮助站长了解站点情况,优化站点。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">这里,对于<strong>存储系统的需求</strong>,是要存储,</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">不同URL,不同时间Time,的PV和UV</span><span style="font-size: 14px;letter-spacing: 1px;">。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">URL+”PV”+Time => $count</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">URL+”UV”+Time => $count</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">PV和UV的值,是MapReduce离线任务计算出来的。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">不管是“网页存储”还是“站点统计”存储,它们都有几个共同的特点:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">数据量极大</span><span style="font-size: 14px;letter-spacing: 1px;">,TB,PB级别</span></p></li> <li><p><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">和时间维度相关</span></p></li> <li><p><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">同一个主键,属性与值有映射</span></p></li> </ul> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">主键是URL,属性是“Content”,值是网页Binary;</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">主键是URL,属性是“PV”和“UV”,值是计数count。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">这是Google曾经遇到的难题,面对这些难题,典型的解决方案又有哪些呢?</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:不是一上来就搞新方案,最先肯定是想用现有的技术要如何解决。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">最容易想到的主键,属性,值的存储系统是什么?</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">没错,就是关系型数据库:</span></p> <p style="text-align: left;"><img class="" data-copyright="0" data-ratio="0.2814814814814815" data-s="300,640" src="/upload/2b52e8b6b68b5cc519b59709027b4d72.jpg" data-type="jpeg" data-w="405" style=""></p> <p><span style="font-size: 14px;letter-spacing: 1px;">如上图所示,用户表</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">User(uid </span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">PK</span><span style="font-size: 14px;letter-spacing: 1px;">, name, gender, age, sex)</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">就是一个典型的主键,属性,值的存储模型:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">主键</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,不同用户的uid</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">属性</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,schema的列名</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">值</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,不同主键的各个列名,对应的值</span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">使用excel来举例是很直观的,这是一个</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">二维table</span><span style="font-size: 14px;letter-spacing: 1px;">。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:屎黄色的主键是一个维度,橙色的属性是一个维度。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">用二维table能不能解决Google网页存储的问题呢?</span></strong></p> <p style="text-align: left;"><img class="" data-copyright="0" data-ratio="0.2839506172839506" data-s="300,640" src="/upload/e1c43656fae20278f8199df8b4854dc3.jpg" data-type="jpeg" data-w="405" style=""></p> <p><span style="font-size: 14px;letter-spacing: 1px;">如上图所示,</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">如果没有时间维度Time,似乎是可以</span><span style="font-size: 14px;letter-spacing: 1px;">的:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">主键</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,使用URL</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">属性</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,schema的列名,例如content,author等</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">值</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,不同URL的内容与作者等值</span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">但是,一旦加入时间维度Time,二维table似乎就不灵了。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">增加一个time属性是没有用的;</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">增加一个time属性,只能记录同一个URL,某一个time的content,不能记录多个time的多个content;</span></em></span></p> <p><span style="color:#0052ff;"><span style="font-size: 14px;letter-spacing: 1px;"><em>增加一个time属性,联合主键,URL就不是KEY了;</em></span></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">能不能用二维table存储三维数据呢?</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">似乎可以通过trick的手段,在key上做文章,</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">用key+time来拼接新key</span><span style="font-size: 14px;letter-spacing: 1px;">来实现。</span></p> <p style="text-align: left;"><img class="" data-copyright="0" data-ratio="0.7160493827160493" data-s="300,640" src="/upload/c6be2a31f8fd3e9c4b12c312fb54fd71.jpg" data-type="jpeg" data-w="405" style=""></p> <p><span style="font-size: 14px;letter-spacing: 1px;">如上图所示,仍然是二维table,通过URL+Time来瓶装key,也能够实现,存储同一个URL,在不同Time,的不同content、author。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">但是,这种trick方案存在的问题是:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">没法实现URL查询</span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);"><span style="color: rgb(0, 82, 255);font-size: 14px;font-style: italic;letter-spacing: 1px;">画外音:</span><span style="color: rgb(0, 82, 255);font-size: 14px;font-style: italic;letter-spacing: 1px;">key上无法进行%like%查询。</span></span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><span style="font-size: 14px;letter-spacing: 1px;">大量空洞,浪费存储空间</span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;">这并不是一个好的方案。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">况且,当数据量达到TB、PB级别时,传统单机关系型数据库,根本无法满足Google的业务需求。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">BigTable解决什么问题?</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">传统二维small table,无法解决Google面临的存储问题,于是Google搞了一个big table来解决。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">Google对这些业务模型进行分析,在二维table的基础上扩充,抽象了一个新的“</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">三维table</span><span style="font-size: 14px;letter-spacing: 1px;">”:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">主键</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,使用URL</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">属性</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,schema的列名,例如content,author等</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">时间</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,timestamp</span></p></li> <li><p><strong><span style="font-size: 14px;letter-spacing: 1px;">值</span></strong><span style="font-size: 14px;letter-spacing: 1px;">,不同URL的内容与作者等值</span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p style="text-align: left;"><img class="" data-copyright="0" data-ratio="0.6935779816513762" data-s="300,640" src="/upload/6816070ca5062fa062484c5186baacd7.jpg" data-type="jpeg" data-w="545" style=""></p> <p><span style="font-size: 14px;letter-spacing: 1px;">如上图所示:</span></p> <ul class=" list-paddingleft-2" style="list-style-type: disc;"> <li><p><span style="font-size: 14px;letter-spacing: 1px;">第一维:key(屎黄色)</span></p></li> <li><p><span style="font-size: 14px;letter-spacing: 1px;">第二维:属性(橙色)</span></p></li> <li><p><span style="font-size: 14px;letter-spacing: 1px;">第三维:time(蓝色)</span></p></li> </ul> <p><span style="font-size: 14px;letter-spacing: 1px;">同一个key,不同属性,不同时间,会存储一个value。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">不像</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">以行为单位</span><span style="font-size: 14px;letter-spacing: 1px;">进行存储的传统关系型数据库,这个三维的大表格BigTable是一个稀疏</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">列存储</span><span style="font-size: 14px;letter-spacing: 1px;">系统。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:能够压缩空间。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">它的</span><span style="letter-spacing: 1px;font-size: 18px;"><strong>数据模型</strong></span><span style="font-size: 14px;letter-spacing: 1px;">的本质是一个</span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">map</span><span style="font-size: 14px;letter-spacing: 1px;">:</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">key + column + time => value</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">的一个超级大map。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">很多业务符合这一个模型;</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">Google的东西能解决业务问题,所以用的人多,这一点很重要。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><strong><span style="font-size: 14px;letter-spacing: 1px;">总结</span></strong></p> <p><span style="font-size: 14px;letter-spacing: 1px;">BigTable是一个<strong>稀疏的</strong>、<strong>分布式的</strong>、<strong>持久化的</strong>、<strong>多维度排序的</strong>、<strong>大数据量</strong></span><span style="font-size: 14px;letter-spacing: 1px;color: rgb(255, 76, 0);">存储系统</span><span style="font-size: 14px;letter-spacing: 1px;">,它能够解决符合上述map数据模型业务的存储问题。</span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="font-size: 14px;letter-spacing: 1px;">画外音:</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">GFS是文件系统;</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">MapReduce是计算模型;</span></em></span></p> <p><span style="color: rgb(0, 82, 255);"><em><span style="color: rgb(0, 82, 255);font-size: 14px;letter-spacing: 1px;">BigTable是存储系统。</span></em></span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">BigTable是啥,解决啥问题,这次终于懂了。</span></p> <p><span style="font-size: 14px;letter-spacing: 1px;"> </span></p> <p><span style="font-size: 14px;letter-spacing: 1px;">很多时候,<strong>定义清楚问题比解决问题更难</strong>。</span></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;line-height: normal;box-sizing: border-box !important;word-wrap: break-word !important;"><img width="auto" data-ratio="1" data-w="250" data-type="jpeg" data-s="300,640" class="" src="/upload/7ddc9700032e2c5cee163f1f1a37b46c.jpg" style="max-width: 677px;box-sizing: border-box;word-wrap: break-word;visibility: visible !important;width: 130px !important;"></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;white-space: normal;background-color: rgb(255, 255, 255);text-align: center;line-height: normal;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;letter-spacing: 1px;box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 12px;">架构师之路-分享</span><span style="max-width: 100%;font-size: 12px;color: rgb(255, 76, 0);">可落地</span><span style="max-width: 100%;font-size: 12px;">的技术文章</span></span></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;text-align: justify;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><br style="max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;"></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;text-align: justify;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 14px;letter-spacing: 1px;box-sizing: border-box !important;word-wrap: break-word !important;">相关推荐:</span></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;text-align: justify;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 14px;letter-spacing: 1px;box-sizing: border-box !important;word-wrap: break-word !important;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651961812&idx=1&sn=592e3cc722bdfc4201d07cb1b087ed06&chksm=bd2d0c088a5a851eec1e01cea1d68a365edab46bc6985c469adb4b0df17f0e6c2f07bda8da47&scene=21#wechat_redirect" target="_blank" style="color: rgb(87, 107, 149);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;">Google FileSystem架构启示</a>》</span></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;text-align: justify;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 14px;letter-spacing: 1px;box-sizing: border-box !important;word-wrap: break-word !important;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651961826&idx=1&sn=98f6ec5271c7a4153c3e50c7b8be4f33&chksm=bd2d0c3e8a5a8528177b34db26876e510486c78f331bd5e51082a22eda9d65b9bfc35abe1c53&scene=21#wechat_redirect" target="_blank" style="color: rgb(87, 107, 149);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;">Google MapReduce解决什么问题?</a>》</span></p> <p style="max-width: 100%;min-height: 1em;color: rgb(51, 51, 51);font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;text-align: justify;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;word-wrap: break-word !important;"><span style="max-width: 100%;font-size: 14px;letter-spacing: 1px;box-sizing: border-box !important;word-wrap: break-word !important;">《<a href="http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651961881&idx=1&sn=a417acab437b7dea6a7ce6b5b9b31bfa&chksm=bd2d0fc58a5a86d30462ab461443683e164425136ba8169efb4cd9ea95e79bff74d3f25fdf0e&scene=21#wechat_redirect" target="_blank" style="color: rgb(87, 107, 149);-webkit-tap-highlight-color: rgba(0, 0, 0, 0);max-width: 100%;box-sizing: border-box !important;word-wrap: break-word !important;">MapReduce,颠覆了分层架构的本质?</a>》</span></p>