理想三旬

* * * * * * ~ * * ~ * * ~ * * ~ ) ( ) * * ~ ) (_) ( (_) ) (_) ( * * (_) # ) (_) ) # ( (_) ( # (_) * _#.-#(_)-#-(_)#(_)-#-(_)#-.#_ * .' # # # # # # # # # # # `. ~ * : # # # # # # # # :...

Paxos Made Simple 翻译

摘要:用大白话来解释 Paxos 算法是非常简单的。 1 引入|Introduction 由于一开始对分布式系统容错的 Paxos 算法的描述,对许多读者而言都过于极客,...

译 Time, Clocks, and the Ordering of Events in a Distributed System

摘要:本文研究在分布式系统中,事件发生先后顺序的概念,并说明如何定义事件之间的偏序关系。论文给出了一种用于同步逻辑时钟系统的分布式算法,该逻...

Metaspace 堆积引起 Full GC 的排查

摘要:线上系统频繁 Full GC,通过监控告警、GC 日志、Heap 分析,逐步定位根因,并确定修复思路。 问题现象 支付服务异地部署前,需要提前打开北京、...

数据结构和算法在存储中的经典应用

Algorithms + Data Structures = Programs —— Niklaus Wirth 先搬出写了 Pascal、又拿了图灵奖的大师的名言,这里不讨论该断言的合理性,只作为本文的引子。在数据库领域,究其原理,绕...

MySQL Binlog 解析组件 open-replicator 原理介绍

open-replicator 是一款高性能的 MySQL binlog 解析组件,通过 open-replicator 可以对 binlog 进行实时的解析、过滤、广播。业界常用的数据同步中间件 databus 就是基于 open-replicator 抓取 MySQL 的 binlog。 在探索 open-replicator 原...

动手搭建一个梯子

由于众所周知的原因,大陆的互联网在一定程度上受限的。这归功于北京某高校校长主导的防火墙项目,我们时不时会看到类似下面这种地图—— 出现防火墙后...

LeetCode-39 Combination Sum

39. Combination Sum Medium Problem Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target. The same repeated number may be chosen from candidates unlimited number of times. Note: All numbers (including target) will be positive integers. The solution set must not contain duplicate combinations. Example 1: Input: candidates = [2,3,6,7], target =...

LeetCode-136 Single Number

136. Single Number Easy Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? Example 1: Input: [2,2,1] Output: 1 Example 2: Input: [4,1,2,1,2] Output: 4 Solution Actually it’s quite simple to solve, but we should make clear that it requires O(N) complexity and no extra...

JavaScript ES6 和 Python 中的 Generator

这几天折腾的一个 RSS 聚合爬虫,前端部分涉及到 redux-saga,对 ES6 里引入的 Generator 运用很花哨,看起来会云里雾里,其实和 Python 的 generator、y...