-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
18 lines (18 loc) · 21.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html><html lang="zh-CN"><head><meta name="google-site-verification" content="DVfrDhwMEodDoWVy6nv0PCpolWhBlGBSaO9hiU2r61E"><meta name="google-site-verification" content="40TgWkMJTOetJQqAMZwk5nD5rtVQRjk5i2pe6FGka5g"><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content="佑祺's Blog"><title>佑祺's Blog | Whatever you do, you have to keep moving forward!</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=0.0.0"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/normalize/8.0.0/normalize.min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/pure-min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/grids-responsive-min.css"><link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create','UA-91282031-1','auto');ga('send','pageview');
</script></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">佑祺's Blog</h1><a id="logo" href="/.">佑祺's Blog</a><p class="description">Whatever you do, you have to keep moving forward!</p></div><div id="nav-menu"><a class="current" href="/."><i class="fa fa-home"> 首页</i></a><a href="/archives/"><i class="fa fa-archive"> 归档</i></a><a href="/about/"><i class="fa fa-user"> 关于</i></a><a href="/atom.xml"><i class="fa fa-rss"> 订阅</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title"><a href="/2021/02/13/DDD/">领域驱动设计学习</a></h1><div class="post-meta">2021-02-13</div><div class="post-content"><h2 id="领域驱动设计:"><a href="#领域驱动设计:" class="headerlink" title="领域驱动设计:"></a>领域驱动设计:</h2><h3 id="什么是领域驱动设计-DDD"><a href="#什么是领域驱动设计-DDD" class="headerlink" title="什么是领域驱动设计(DDD)"></a>什么是领域驱动设计(DDD)</h3><p>领域驱动设计是一种软件开发方法,它围绕业务概念构建领域模型,指导我们将复杂问题进行拆分,解决大型复杂系统在落地中遇到的问题,设计出能够准确表达业务意图的软件模型。</p></div><p class="readmore"><a href="/2021/02/13/DDD/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/31/Distributed-Transaction-9/">从零开始写一个分布式事务框架(九)-RoadMap</a></h1><div class="post-meta">2020-05-31</div><div class="post-content"><p>功能:</p>
<ol>
<li>支持嵌套分布式事务。</li>
<li>支持二阶段异步提交。</li>
<li>支持二阶段延迟提交。秒杀抢购等业务峰值时可以将二阶段延迟到低峰期执行。</li></div><p class="readmore"><a href="/2020/05/31/Distributed-Transaction-9/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/24/Distributed-Transaction-8/">从零开始写一个分布式事务框架(八)-使用教程</a></h1><div class="post-meta">2020-05-24</div><div class="post-content"><h3 id="从业务服务"><a href="#从业务服务" class="headerlink" title="从业务服务"></a>从业务服务</h3><h4 id="POM引入"><a href="#POM引入" class="headerlink" title="POM引入"></a>POM引入</h4><figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag"><<span class="name">dependency</span>></span></div><div class="line"> <span class="tag"><<span class="name">groupId</span>></span>cn.blogxin<span class="tag"></<span class="name">groupId</span>></span></div><div class="line"> <span class="tag"><<span class="name">artifactId</span>></span>dt-client-api<span class="tag"></<span class="name">artifactId</span>></span></div><div class="line"> <span class="tag"><<span class="name">version</span>></span>0.0.1-SNAPSHOT<span class="tag"></<span class="name">version</span>></span></div><div class="line"><span class="tag"></<span class="name">dependency</span>></span></div></pre></td></tr></table></figure></div><p class="readmore"><a href="/2020/05/24/Distributed-Transaction-8/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/24/Distributed-Transaction-7/">从零开始写一个分布式事务框架(七)-SpringBootStarter</a></h1><div class="post-meta">2020-05-24</div><div class="post-content"><h3 id="SpringBoot-Starter"><a href="#SpringBoot-Starter" class="headerlink" title="SpringBoot-Starter"></a>SpringBoot-Starter</h3><p>基于前面开发好的模块,创建SpringBoot-Starter进行整合,通过Spring-Boot的加载机制进行分布式事物组件DT的自动装配,便于使用。</p>
<h4 id="pom文件:"><a href="#pom文件:" class="headerlink" title="pom文件:"></a>pom文件:</h4><p>在项目的pom文件中定义之前开发过程中需要使用的模块,以及使用的相关依赖。</p></div><p class="readmore"><a href="/2020/05/24/Distributed-Transaction-7/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/24/Distributed-Transaction-6/">从零开始写一个分布式事务框架(六)-事务协调器</a></h1><div class="post-meta">2020-05-24</div><div class="post-content"><p>Transaction Coordinator:事务协调器。维护分布式事务的状态,负责对分布式事务进行补偿提交或回滚。</p>
<p>事务协调器定义的接口如下:</p></div><p class="readmore"><a href="/2020/05/24/Distributed-Transaction-6/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/16/Distributed-Transaction-5/">从零开始写一个分布式事务框架(五)-资源管理器</a></h1><div class="post-meta">2020-05-16</div><div class="post-content"><p>Resource Manager:资源管理器。控制分支事务,负责分支注册、状态汇报,驱动分支事务的提交和回滚。</p>
<p>资源管理器器定义的接口如下:</p></div><p class="readmore"><a href="/2020/05/16/Distributed-Transaction-5/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/09/Distributed-Transaction-4/">从零开始写一个分布式事务框架(四)-事务管理器</a></h1><div class="post-meta">2020-05-09</div><div class="post-content"><p>Transaction Manager:事务管理器。控制分布式事务的边界,负责开启一个分布式事务,并最终发起分布式事务提交或回滚的决议。</p>
<p>事务管理器定义的接口如下:</p></div><p class="readmore"><a href="/2020/05/09/Distributed-Transaction-4/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/05/Distributed-Transaction-3/">从零开始写一个分布式事务框架(三)-事务记录</a></h1><div class="post-meta">2020-05-05</div><div class="post-content"><p><strong>事务记录</strong>是用来记录每笔分布式事务状态的记录以及事务中各个分支事务状态的记录,需要在实际事务操作发生前,先写入到事务记录表,再进行事务操作,如果遇到异常情况,就可以根据存储的事务记录,通过二阶段接口进行分布式事务的恢复,来保证分布式事务的最终一致性。</p>
<p>这种数据恢复的思路也叫做<strong>WAL(Write-Ahead-Log) 预写式日志</strong> ,该机制用于数据的容错和恢复,在数据写入到数据库之前,先写入到日志,再将日志记录变更到存储器中。</p></div><p class="readmore"><a href="/2020/05/05/Distributed-Transaction-3/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/05/04/Distributed-Transaction-2/">从零开始写一个分布式事务框架(二)-架构</a></h1><div class="post-meta">2020-05-04</div><div class="post-content"><p>根据<a href="http://blogxin.cn/2020/02/16/Distributed-Transaction-1/">上篇</a>描述的实现思路和原理,进行功能拆解和组件的划分,梳理出如下整体架构图:</p></div><p class="readmore"><a href="/2020/05/04/Distributed-Transaction-2/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2020/02/16/Distributed-Transaction-1/">从零开始写一个分布式事务框架(一)</a></h1><div class="post-meta">2020-02-16</div><div class="post-content"><p>在工作的过程中,经常会遇到一些分布式环境下数据一致性的问题,尤其是在做一些交易、支付、账户等业务的时候,其中不可避免的会涉及到一些分布式事务领域的技术方案,在之前的工作中也曾经使用过分布式事务框架来解决问题,一直对这一领域的问题十分感兴趣,所以就想着自己动手造个轮子,从零开始写一个分布式事务框架,以此加深自己对分布式事务的理解和在系统架构与实现上的经验积累,在这里记录一下自己造轮子过程中的过程和思考。</p></div><p class="readmore"><a href="/2020/02/16/Distributed-Transaction-1/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2019/06/01/sharding-db/">基于Spring+MyBatis实现一个分库分表、读写分离功能的工具库</a></h1><div class="post-meta">2019-06-01</div><div class="post-content"><p>一般随着业务的高速发展,业务量越来越大,业务也越来越复杂,数据量也越来越大,数据库层面的优化通常会使用分库分表、主从读写分离的策略进行扩展。本文介绍了分库分表,主从读写分离的优缺点,并对其中一种实现方案进行了原理描述,并亲自动手实现了一个可实用的demo。</p>
<h2 id="分表的优缺点"><a href="#分表的优缺点" class="headerlink" title="分表的优缺点"></a>分表的优缺点</h2><h3 id="垂直拆分:"><a href="#垂直拆分:" class="headerlink" title="垂直拆分:"></a>垂直拆分:</h3><p>垂直拆分分表指的是将一张大表根据业务、字段冷热、大字段等因素,拆分成多个结构不同的表。</p></div><p class="readmore"><a href="/2019/06/01/sharding-db/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2019/03/02/multi-datacenter/">多活架构思考总结</a></h1><div class="post-meta">2019-03-02</div><div class="post-content"><h2 id="为什么要做多活"><a href="#为什么要做多活" class="headerlink" title="为什么要做多活"></a>为什么要做多活</h2><p>多活架构主要是为了提升系统的容灾能力,提高系统的可用性,保障业务持续可用。比如单机房的网络故障、地震火灾等不可抗因素,都有可能造成整个机房瘫痪,对业务的可用性造成严重影响。多活架构还可以解决单机房容量问题,提高系统的扩展能力。</p></div><p class="readmore"><a href="/2019/03/02/multi-datacenter/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2019/02/06/spring-boot-init/">SpringBoot启动流程解析</a></h1><div class="post-meta">2019-02-06</div><div class="post-content"><p>SpringBoot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。</p>
<p>下面通过源码来了解下SpringBoot的启动流程。(展示代码基于<code>2.1.1.RELEASE</code>)</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="meta">@SpringBootApplication</span></div><div class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">DemoApplication</span> </span>{</div><div class="line"></div><div class="line"> <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">main</span><span class="params">(String[] args)</span> </span>{</div><div class="line"> SpringApplication.run(DemoApplication.class, args);</div><div class="line"> }</div><div class="line">}</div></pre></td></tr></table></figure></div><p class="readmore"><a href="/2019/02/06/spring-boot-init/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/11/15/OOM-killer/">线上Java进程消失排查分析</a></h1><div class="post-meta">2018-11-15</div><div class="post-content"><h2 id="问题背景"><a href="#问题背景" class="headerlink" title="问题背景"></a>问题背景</h2><p>线上突然收到某应用端口报警,登陆服务器后,发现机器上的Java应用进程莫名其妙的消失了,便进行了一番排查,并把排查分析的过程做了下总结记录。</p></div><p class="readmore"><a href="/2018/11/15/OOM-killer/">阅读全文</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/09/30/Distributed-Consistency/">分布式系统数据一致性问题常见解决方案</a></h1><div class="post-meta">2018-09-30</div><div class="post-content"><p>随着业务的发展,为了提高系统的可用性,可维护性等,单一系统逐渐分解为业务功能独立的多个微服务组成的分布式系统集群,事务处理能力也被拆解到各个微服务中。这个时候一笔交易会涉及到交易,支付,券,账户等多个微服务系统的交互,多个微服务之间的交互如何保证上下游系统的数据一致性,就成了在日常研发过程中比较头疼的事情。</p></div><p class="readmore"><a href="/2018/09/30/Distributed-Consistency/">阅读全文</a></p></div><nav class="page-navigator"><span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><a class="page-number" href="/page/4/">4</a><a class="extend next" rel="next" href="/page/2/">下一页</a></nav></div></div><div class="pure-u-1-4 hidden_mid_and_down"><div id="sidebar"><div class="widget"><form class="search-form" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank"><input type="text" name="q" maxlength="20" placeholder="Search"/><input type="hidden" name="sitesearch" value="http://blogxin.cn"/></form></div><div class="widget"><div class="widget-title"><i class="fa fa-folder-o"> 分类</i></div><ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Concurrent/">Concurrent</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Git/">Git</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/IO-NIO/">IO&NIO</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Java/">Java</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/MQ/">MQ</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Netty/">Netty</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Spring/">Spring</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tomcat/">Tomcat</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Tools/">Tools</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/架构/">架构</a><span class="category-list-count">15</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/线上问题/">线上问题</a><span class="category-list-count">4</span></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-star-o"> 标签</i></div><div class="tagcloud"><a href="/tags/源码/" style="font-size: 15px;">源码</a> <a href="/tags/Spring/" style="font-size: 15px;">Spring</a> <a href="/tags/架构/" style="font-size: 15px;">架构</a> <a href="/tags/DDD/" style="font-size: 15px;">DDD</a> <a href="/tags/IO/" style="font-size: 15px;">IO</a> <a href="/tags/NIO/" style="font-size: 15px;">NIO</a> <a href="/tags/JVM/" style="font-size: 15px;">JVM</a> <a href="/tags/GC/" style="font-size: 15px;">GC</a> <a href="/tags/线上问题/" style="font-size: 15px;">线上问题</a> <a href="/tags/内存泄漏/" style="font-size: 15px;">内存泄漏</a> <a href="/tags/Java/" style="font-size: 15px;">Java</a> <a href="/tags/并发/" style="font-size: 15px;">并发</a> <a href="/tags/锁/" style="font-size: 15px;">锁</a> <a href="/tags/Transaction/" style="font-size: 15px;">Transaction</a> <a href="/tags/Git/" style="font-size: 15px;">Git</a> <a href="/tags/异步/" style="font-size: 15px;">异步</a> <a href="/tags/缓存/" style="font-size: 15px;">缓存</a> <a href="/tags/读写锁/" style="font-size: 15px;">读写锁</a> <a href="/tags/线程池/" style="font-size: 15px;">线程池</a> <a href="/tags/BIO/" style="font-size: 15px;">BIO</a> <a href="/tags/AIO/" style="font-size: 15px;">AIO</a> <a href="/tags/JMM/" style="font-size: 15px;">JMM</a> <a href="/tags/内存模型/" style="font-size: 15px;">内存模型</a> <a href="/tags/Netty/" style="font-size: 15px;">Netty</a> <a href="/tags/MQ/" style="font-size: 15px;">MQ</a> <a href="/tags/Tomcat/" style="font-size: 15px;">Tomcat</a> <a href="/tags/Tools/" style="font-size: 15px;">Tools</a> <a href="/tags/SpringBoot/" style="font-size: 15px;">SpringBoot</a> <a href="/tags/MyBatis/" style="font-size: 15px;">MyBatis</a></div></div><div class="widget"><div class="widget-title"><i class="fa fa-file-o"> 最近文章</i></div><ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2021/02/13/DDD/">领域驱动设计学习</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/31/Distributed-Transaction-9/">从零开始写一个分布式事务框架(九)-RoadMap</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/24/Distributed-Transaction-8/">从零开始写一个分布式事务框架(八)-使用教程</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/24/Distributed-Transaction-7/">从零开始写一个分布式事务框架(七)-SpringBootStarter</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/24/Distributed-Transaction-6/">从零开始写一个分布式事务框架(六)-事务协调器</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/16/Distributed-Transaction-5/">从零开始写一个分布式事务框架(五)-资源管理器</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/09/Distributed-Transaction-4/">从零开始写一个分布式事务框架(四)-事务管理器</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/05/Distributed-Transaction-3/">从零开始写一个分布式事务框架(三)-事务记录</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/05/04/Distributed-Transaction-2/">从零开始写一个分布式事务框架(二)-架构</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/02/16/Distributed-Transaction-1/">从零开始写一个分布式事务框架(一)</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-external-link"> 友情链接</i></div><ul></ul><a href="http://blog.csdn.net/xx_ytm" title="我的CSDN博客" target="_blank">我的CSDN博客</a></div></div></div><div class="pure-u-1 pure-u-md-3-4"><div id="footer">Copyright © 2021 <a href="/." rel="nofollow">佑祺's Blog.</a> Powered by<a rel="nofollow" target="_blank" href="https://hexo.io"> Hexo.</a><a rel="nofollow" target="_blank" href="https://github.com/tufu9441/maupassant-hexo"> Theme</a> by<a rel="nofollow" target="_blank" href="https://github.com/pagecho"> Cho.</a></div></div></div><a class="show" id="rocket" href="#top"></a><script type="text/javascript" src="/js/totop.js?v=0.0.0" async></script><script type="text/javascript" src="//cdn.bootcss.com/fancybox/3.3.5/jquery.fancybox.min.js" async></script><script type="text/javascript" src="/js/fancybox.js?v=0.0.0" async></script><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/fancybox/3.3.5/jquery.fancybox.min.css"><script type="text/javascript" src="/js/codeblock-resizer.js?v=0.0.0"></script><script type="text/javascript" src="/js/smartresize.js?v=0.0.0"></script></div></body></html>