-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
18 lines (18 loc) · 14.9 KB
/
Copy pathindex.html
File metadata and controls
18 lines (18 loc) · 14.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html><html lang="en"><head><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="keep moving"><title>terrence mu's blog</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/6.0.0/normalize.min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/0.6.2/pure-min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/0.6.2/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.2.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"><link rel="alternate" type="application/atom+xml" href="/atom.xml"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">terrence mu's blog</h1><a id="logo" href="/.">terrence mu's blog</a><p class="description"></p></div><div id="nav-menu"><a href="/." class="current"><i class="fa fa-home"> Home</i></a><a href="/archives/"><i class="fa fa-archive"> Archive</i></a><a href="/about/"><i class="fa fa-user"> About</i></a><a href="/atom.xml"><i class="fa fa-rss"> RSS</i></a></div></div><div id="layout" class="pure-g"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title"><a href="/2018/02/18/springbootinaction/">Spring boot in Action 笔记</a></h1><div class="post-meta">2018-02-18</div><div class="post-content"><h5 id="Spring-boot-提供的四个核心功能"><a href="#Spring-boot-提供的四个核心功能" class="headerlink" title="Spring boot 提供的四个核心功能"></a>Spring boot 提供的四个核心功能</h5><ul>
<li>auto config - 声明式的标识,如@Bean来实现实例的自动注入。</li></div><p class="readmore"><a href="/2018/02/18/springbootinaction/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2018/01/29/springmark/">Spring key point mark on</a></h1><div class="post-meta">2018-01-29</div><div class="post-content"><p>Spring & Spring boot related mark</p>
<h4 id="Event"><a href="#Event" class="headerlink" title="Event"></a>Event</h4><p>ApplicationEvent - create application event<br>ApplicationListener - listen application event<br>ApplicationContext 继承自 ApplicationEventPublisher - publish applicaton event</p></div><p class="readmore"><a href="/2018/01/29/springmark/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/10/28/mysqlstudy/">高性能MySQL 学习笔记</a></h1><div class="post-meta">2017-10-28</div><div class="post-content"><p>第一章 Mysql架构和历史</p>
<p>MySQL的两种基本锁</p>
<p>表锁和行级锁</p>
<ul>
<li><p>表锁<br>读锁互不排斥,写锁互斥。Mysql 服务器层会根据情况添加表锁,如ALTER TABLE操作。</p></div><p class="readmore"><a href="/2017/10/28/mysqlstudy/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/08/23/regextips/">正则表达式Tips</a></h1><div class="post-meta">2017-08-23</div><div class="post-content"><h3 id="正则表达式引擎"><a href="#正则表达式引擎" class="headerlink" title="正则表达式引擎"></a>正则表达式引擎</h3><p>正则表达式的正则引擎主要分为两大类:DFA和NFA,NFA又细分为传统型NFA,POSIX NFA。</p>
<h4 id="DFA(确定型有穷机)"><a href="#DFA(确定型有穷机)" class="headerlink" title="DFA(确定型有穷机)"></a>DFA(确定型有穷机)</h4><ul></div><p class="readmore"><a href="/2017/08/23/regextips/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/05/13/jmm/">Java Memory Model</a></h1><div class="post-meta">2017-05-13</div><div class="post-content"><p>##Java Memory Model<br>线程之间的通信机制有两种:共享内存和消息传递。</p>
<blockquote>
<ul>
<li>线程之间的公共状态,在共享内存的并发模型里,是通过写-读内存中的公共状态来隐式进行通信。在消息传递的并发模型里,是通过明确的发送消息来显式进行通信。</li></div><p class="readmore"><a href="/2017/05/13/jmm/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/04/11/javaio/">javaio</a></h1><div class="post-meta">2017-04-11</div><p class="readmore"><a href="/2017/04/11/javaio/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/04/10/javaclass/">Java Class文件</a></h1><div class="post-meta">2017-04-10</div><div class="post-content"><p><strong>Java Class文件</strong><br>Java Class文件是Java支持跨平台的基础,它是由不同位数的字节组成的,也称为字节码文件。<br>其组织结构如下</p>
</div><p class="readmore"><a href="/2017/04/10/javaclass/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/03/20/javacompile/">Java类编译,加载,执行</a></h1><div class="post-meta">2017-03-20</div><div class="post-content"><p><strong>Java类编译,加载和执行</strong><br>Java类的编译,加载和执行,常常被人们忽略。现在我们来看看这块具体的相关知识。</p>
<p>1.Java类编译<br>Javac编译类的步骤如下:</p>
<img src="/2017/03/20/javacompile/javacompile.png" title="java compile process"></div><p class="readmore"><a href="/2017/03/20/javacompile/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2017/02/10/file/">JAVA IO -- File</a></h1><div class="post-meta">2017-02-10</div><p class="readmore"><a href="/2017/02/10/file/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2016/12/29/zab/">zab 协议</a></h1><div class="post-meta">2016-12-29</div><div class="post-content"><p><strong>Zab 协议</strong><br>ZAB协议是专门为ZooKeeper设计的崩溃可恢复的原子消息广播算法。ZooKeeper的分布式一致性主要由ZAB协议来实现。它通过一个单一的主进程来接收并处理客户端的所有事务请求,并采用ZAB的原子广播协议,将服务器的状态变更以事务Proposal的形式广播到所有的副本进程上去。<br>协议的核心是所有事务请求必须由一个全局唯一的服务器来协调处理,即leader,而余下的其他服务器则为follower。leader服务器负责将一个客户端事务请求转换为一个事务Proposal提议,并将该Proposal分发给集群中所有的Follower服务器。如果Leader接收到了超过半数的Follower服务器进行了正确的反馈,leader就会再次向Follower发送Commit消息,要求其将前一个Proposal提交。</p></div><p class="readmore"><a href="/2016/12/29/zab/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2016/12/25/zookeeper/">zookeeper简介</a></h1><div class="post-meta">2016-12-25</div><div class="post-content"><p><strong>zookeeper简介</strong><br>zookeeper为分布式应用提供了高效可靠的基础服务,它并没有直接实用paxos算法作为分布式一致性上的解决方法,而是采用了ZAB协议(ZooKeeper Atomic Broadcast)。<br>它提供了如下特性:<br>1.顺序一致性,即从同一个客户端发起的事务请求,最终将会严格地按照其发送顺序被应用到ZooKeeper中。<br>2.原子性,所有事务请求最终处理的结果在整个集群是一致的,不存在一部分执行了该事务,一部分没有的情况。<br>3.单一视图,无论客户端连接的是哪台zookeeper服务器,其看到的服务端数据模型都是一致的。<br>4.可靠性,一旦服务端成功应用了一条事务,并完成对客户端的响应,那么该事务所引起的服务端状态的变更会一直保持下去,直到一个新的事务对其做了改变。<br>5.实时性,zookeeper能够保证在一定的时间段内,客户端最终一定能从服务端读到最新状态的数据。</p></div><p class="readmore"><a href="/2016/12/25/zookeeper/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2016/12/12/paxosinchubby/">paxos在chubby的应用</a></h1><div class="post-meta">2016-12-12</div><div class="post-content"><p><strong>paxos在chubby中的应用</strong></p>
<p>paxos在chubby中主要作为日志层一致性的保证,为上层的分布式锁和数据库提供保障。<br><img src="/2016/12/12/paxosinchubby/chubby.jpg" title="chubby"></p></div><p class="readmore"><a href="/2016/12/12/paxosinchubby/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2016/10/22/chubby/">chubby介绍</a></h1><div class="post-meta">2016-10-22</div><div class="post-content"><p><strong>chubby</strong></p>
<hr>
<p><strong>chubby系统架构</strong></p>
<p>大致如下图所示:<br><img src="/source/_posts/chubby/chbbyserver.png" alt="image"><br> 一个由chubby cell组成的chubby server集群,客户端的chubby lib通过Rpc协议与服务端进行通讯,chubby cell之间通过paxos算法选举server中的master。</p></div><p class="readmore"><a href="/2016/10/22/chubby/">Read More</a></p></div><div class="post"><h1 class="post-title"><a href="/2016/10/17/paxos/">paxos 算法</a></h1><div class="post-meta">2016-10-17</div><div class="post-content"><p><strong>分布式一致性的背景</strong><br>1.面临的问题<br>通讯异常,网络分区,三态(成功,失败,超时),节点故障<br>2.相关的概念<br>(1) ACID<br>原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability)<br>(2) CAP原理<br>指的是 一致性(CONSISTENCY)可用性(AVAILABILITY)分区容忍性(PARTITION TOLERANCE)这三个要素最多只能同时实现两点,不可能三者兼顾。在进行分布式架构设计时,必须做出取舍。而对于分布式数据系统,分区容忍性是基本要求,否则就失去了价值。<br>一般情况下分布式数据系统,就是在一致性和可用性之间取一个平衡。<br>对于大多数WEB应用,其实并不需要强一致性,因此牺牲一致性而换取高可用性,是多数分布式产品的方向。<br>(3) BASE理论<br>BASE理论是最终一致性的理论支撑,它的全称是 Basically Available(基本可用),Soft-state(软状态/柔性事务),Eventually Consistent(最终一致性)。在理论逻辑上它是相反于ACID模型的,它牺牲高一致性,获得可用性和分区容忍性。</p></div><p class="readmore"><a href="/2016/10/17/paxos/">Read More</a></p></div></div></div><div class="pure-u-1-4 hidden_mid_and_down"><div id="sidebar"><div class="widget"><form action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" class="search-form"><input type="text" name="q" maxlength="20" placeholder="Search"/><input type="hidden" name="sitesearch" value="http://yoursite.com"/></form></div><div class="widget"><div class="widget-title"><i class="fa fa-folder-o"> Categories</i></div></div><div class="widget"><div class="widget-title"><i class="fa fa-star-o"> Tags</i></div><div class="tagcloud"><a href="/tags/spring-spring-boot-key-point/" style="font-size: 15px;">spring, spring boot, key point</a> <a href="/tags/JAVA-IO-JDK-File/" style="font-size: 15px;">JAVA IO, JDK , File</a> <a href="/tags/分布式锁-GFS-Big-Table/" style="font-size: 15px;">分布式锁,GFS,Big Table</a> <a href="/tags/Java原理/" style="font-size: 15px;">Java原理</a> <a href="/tags/chubby-paxos/" style="font-size: 15px;">chubby paxos</a> <a href="/tags/regex,DFA,NFA/" style="font-size: 15px;">regex,DFA,NFA</a> <a href="/tags/JDK-Class文件/" style="font-size: 15px;">JDK,Class文件</a> <a href="/tags/zab-ZooKeeper/" style="font-size: 15px;">zab, ZooKeeper</a> <a href="/tags/分布式一致性-zookeeper-ZAB/" style="font-size: 15px;">分布式一致性,zookeeper,ZAB</a> <a href="/tags/JMM/" style="font-size: 15px;">JMM</a> <a href="/tags/paxos-分布式/" style="font-size: 15px;">paxos,分布式</a> <a href="/tags/MySQL-数据库设计/" style="font-size: 15px;">MySQL,数据库设计</a> <a href="/tags/spring-boot/" style="font-size: 15px;">spring boot</a></div></div><div class="widget"><div class="widget-title"><i class="fa fa-file-o"> Recent</i></div><ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2018/02/18/springbootinaction/">Spring boot in Action 笔记</a></li><li class="post-list-item"><a class="post-list-link" href="/2018/01/29/springmark/">Spring key point mark on</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/10/28/mysqlstudy/">高性能MySQL 学习笔记</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/08/23/regextips/">正则表达式Tips</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/05/13/jmm/">Java Memory Model</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/04/11/javaio/">javaio</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/04/10/javaclass/">Java Class文件</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/03/20/javacompile/">Java类编译,加载,执行</a></li><li class="post-list-item"><a class="post-list-link" href="/2017/02/10/file/">JAVA IO -- File</a></li><li class="post-list-item"><a class="post-list-link" href="/2016/12/29/zab/">zab 协议</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-external-link"> Links</i></div><ul></ul><a href="http://www.example1.com/" title="site-name1" target="_blank">site-name1</a><ul></ul><a href="http://www.example2.com/" title="site-name2" target="_blank">site-name2</a><ul></ul><a href="http://www.example3.com/" title="site-name3" target="_blank">site-name3</a></div></div></div><div class="pure-u-1 pure-u-md-3-4"><div id="footer">Copyright © 2018 <a href="/." rel="nofollow">terrence mu'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 id="rocket" href="#top" class="show"></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.0.47/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.0.47/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>