-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from GuoXiCheng/dev-c
update docs
- Loading branch information
Showing
9 changed files
with
129 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>Markmap</title> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
#mindmap { | ||
display: block; | ||
width: 100vw; | ||
height: 100vh; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="https://unpkg.com/markmap-toolbar@0.15.6/dist/style.css"> | ||
</head> | ||
<body> | ||
<svg id="mindmap"></svg> | ||
<script src="https://unpkg.com/d3@7.8.5/dist/d3.min.js"></script><script src="https://unpkg.com/markmap-view@0.15.6/dist/browser/index.js"></script><script src="https://unpkg.com/markmap-toolbar@0.15.6/dist/index.js"></script><script>(r => { | ||
setTimeout(r); | ||
})(() => { | ||
const { | ||
markmap, | ||
mm | ||
} = window; | ||
const { | ||
el | ||
} = markmap.Toolbar.create(mm); | ||
el.setAttribute('style', 'position:absolute;bottom:20px;right:20px'); | ||
document.body.append(el); | ||
})</script><script>((getMarkmap, getOptions, root2, jsonOptions) => { | ||
const markmap = getMarkmap(); | ||
window.mm = markmap.Markmap.create( | ||
"svg#mindmap", | ||
(getOptions || markmap.deriveOptions)(jsonOptions), | ||
root2 | ||
); | ||
})(() => window.markmap,null,{"type":"heading","depth":0,"payload":{"lines":[0,1]},"content":"JS全栈技能树","children":[{"type":"heading","depth":1,"payload":{"lines":[2,3]},"content":"Web","children":[{"type":"heading","depth":2,"payload":{"lines":[3,4]},"content":"HTML","children":[]},{"type":"heading","depth":2,"payload":{"lines":[4,5]},"content":"CSS","children":[{"type":"heading","depth":3,"payload":{"lines":[5,6]},"content":"Flex 布局","children":[]},{"type":"heading","depth":3,"payload":{"lines":[6,7]},"content":"Grid 布局","children":[]}]}]},{"type":"heading","depth":1,"payload":{"lines":[8,9]},"content":"NodeJS","children":[]},{"type":"heading","depth":1,"payload":{"lines":[10,11]},"content":"数据库","children":[{"type":"heading","depth":2,"payload":{"lines":[11,12]},"content":"数据库原理","children":[{"type":"heading","depth":3,"payload":{"lines":[12,13]},"content":"事务隔离级别","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[13,14]},"content":"MySQL","children":[]},{"type":"heading","depth":2,"payload":{"lines":[14,15]},"content":"PostgreSQL","children":[]},{"type":"heading","depth":2,"payload":{"lines":[15,16]},"content":"MongoDB","children":[]},{"type":"heading","depth":2,"payload":{"lines":[16,17]},"content":"Redis","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[19,20]},"content":"前端","children":[{"type":"heading","depth":2,"payload":{"lines":[20,21]},"content":"Vue","children":[]},{"type":"heading","depth":2,"payload":{"lines":[21,22]},"content":"React","children":[]},{"type":"heading","depth":2,"payload":{"lines":[22,23]},"content":"Angular","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[24,25]},"content":"后端","children":[{"type":"heading","depth":2,"payload":{"lines":[25,26]},"content":"Express","children":[]},{"type":"heading","depth":2,"payload":{"lines":[26,27]},"content":"NestJS","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[28,29]},"content":"移动端","children":[{"type":"heading","depth":2,"payload":{"lines":[29,30]},"content":"React Native","children":[]},{"type":"heading","depth":2,"payload":{"lines":[30,31]},"content":"微信小程序","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[32,33]},"content":"桌面端","children":[{"type":"heading","depth":2,"payload":{"lines":[33,34]},"content":"Electron","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[35,36]},"content":"测试","children":[{"type":"heading","depth":2,"payload":{"lines":[36,37]},"content":"Jest","children":[]},{"type":"heading","depth":2,"payload":{"lines":[37,38]},"content":"Mocha","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[39,40]},"content":"云原生","children":[{"type":"heading","depth":2,"payload":{"lines":[40,41]},"content":"Docker","children":[{"type":"heading","depth":3,"payload":{"lines":[41,42]},"content":"docker 架构","children":[]},{"type":"heading","depth":3,"payload":{"lines":[42,43]},"content":"docker 安装","children":[]},{"type":"heading","depth":3,"payload":{"lines":[43,44]},"content":"docker 基本用法","children":[]},{"type":"heading","depth":3,"payload":{"lines":[44,45]},"content":"docker 镜像结构","children":[]},{"type":"heading","depth":3,"payload":{"lines":[45,46]},"content":"docker 镜像构建","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[47,48]},"content":"Kubernetes","children":[]},{"type":"heading","depth":2,"payload":{"lines":[48,49]},"content":"Prometheus","children":[]}]},{"type":"heading","depth":1,"payload":{"lines":[50,51]},"content":"软件工程","children":[{"type":"heading","depth":2,"payload":{"lines":[51,52]},"content":"12因素应用","children":[{"type":"heading","depth":3,"payload":{"lines":[52,53]},"content":"基准代码","children":[]},{"type":"heading","depth":3,"payload":{"lines":[53,54]},"content":"依赖","children":[]},{"type":"heading","depth":3,"payload":{"lines":[54,55]},"content":"配置","children":[]},{"type":"heading","depth":3,"payload":{"lines":[55,56]},"content":"后端服务","children":[]},{"type":"heading","depth":3,"payload":{"lines":[56,57]},"content":"构建、发布、运行","children":[]},{"type":"heading","depth":3,"payload":{"lines":[57,58]},"content":"进程","children":[]},{"type":"heading","depth":3,"payload":{"lines":[58,59]},"content":"端口绑定","children":[]},{"type":"heading","depth":3,"payload":{"lines":[59,60]},"content":"并发","children":[]},{"type":"heading","depth":3,"payload":{"lines":[60,61]},"content":"易处理","children":[]},{"type":"heading","depth":3,"payload":{"lines":[61,62]},"content":"开发环境与线上环境等价","children":[]},{"type":"heading","depth":3,"payload":{"lines":[62,63]},"content":"日志","children":[]},{"type":"heading","depth":3,"payload":{"lines":[63,64]},"content":"管理进程","children":[]}]}]},{"type":"heading","depth":1,"payload":{"lines":[66,67]},"content":"设计模式(23种)","children":[{"type":"heading","depth":2,"payload":{"lines":[67,68]},"content":"行为型模式(11种)","children":[{"type":"heading","depth":3,"payload":{"lines":[68,69]},"content":"责任链模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[69,70]},"content":"命令模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[70,71]},"content":"迭代器模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[71,72]},"content":"中介者模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[72,73]},"content":"备忘录模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[73,74]},"content":"观察者模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[74,75]},"content":"状态模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[75,76]},"content":"策略模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[76,77]},"content":"模板方法模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[77,78]},"content":"访问者模式","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[79,80]},"content":"创建型模式(5种)","children":[{"type":"heading","depth":3,"payload":{"lines":[80,81]},"content":"单例模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[81,82]},"content":"工厂方法模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[82,83]},"content":"抽象工厂模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[83,84]},"content":"建造者模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[84,85]},"content":"原型模式","children":[]}]},{"type":"heading","depth":2,"payload":{"lines":[86,87]},"content":"结构型模式(7种)","children":[{"type":"heading","depth":3,"payload":{"lines":[87,88]},"content":"适配器模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[88,89]},"content":"桥接模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[89,90]},"content":"组合模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[90,91]},"content":"装饰模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[91,92]},"content":"外观模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[92,93]},"content":"享元模式","children":[]},{"type":"heading","depth":3,"payload":{"lines":[93,94]},"content":"代理模式","children":[]}]}]}]},{})</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 19 additions & 1 deletion
20
src/software-engineering/twelve-factor/009-disposability.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
# 易处理 | ||
--- | ||
date: 2024-03-08 | ||
--- | ||
|
||
# 易处理 | ||
|
||
## 核心思想 | ||
|
||
快速启动和优雅停止。 | ||
|
||
## 快速启动 | ||
|
||
快速启动是指进程应当追求最小启动时间,更少的启动时间提供了更敏捷的发布及扩展过程,进程将更容易迁移到新的物理机上,增加了健壮性。 | ||
|
||
## 优雅停止 | ||
|
||
优雅停止是指进程一旦接收到停止信号(SIGTERM),应当停止监听服务的端口,拒绝所有新的请求,并继续执行当前已接收的请求,然后退出。 | ||
|
||
对 worker 进程而言,应当将当前任务退回队列,并释放所有系统资源。 |
25 changes: 24 additions & 1 deletion
25
src/software-engineering/twelve-factor/010-dev-prod-parity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
# 开发环境与线上环境等价 | ||
--- | ||
date: 2024-03-08 | ||
--- | ||
|
||
# 开发环境与线上环境等价 | ||
|
||
## 核心思想 | ||
|
||
尽可能保持开发、预发布和线上环境的等价性。 | ||
|
||
## 缩小本地与线上差异 | ||
|
||
- 缩小时间差异:开发人员可以几小时,甚至几分钟就部署代码。 | ||
|
||
- 缩小人员差异:开发人员不只要编写代码,更应该密切参与部署过程以及代码在线上的表现。 | ||
|
||
- 缩小工具差异:尽量保证开发环境以及线上环境的一致性。 | ||
|
||
|
||
| | 传统应用 | 12-Factor 应用 | | ||
| -------------------- | -------- | -------------- | | ||
| 每次部署间隔 | 数周 | 几小时 | | ||
| 开发人员 vs 运维人员 | 不同的人 | 相同的人 | | ||
| 开发环境 vs 线上环境 | 不同 | 尽量接近 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# 日志 | ||
--- | ||
date: 2024-03-08 | ||
--- | ||
|
||
# 日志 | ||
|
||
## 核心思想 | ||
|
||
把日志当作事件流。 | ||
|
||
## 应用的日志管理 | ||
|
||
12-Factor APP 不应该试图自己管理日志的输出流,不应写或维护日志文件,每一个进程都会直接提供标准输出事件流。 | ||
|
||
在开发环境中,可以通过实时终端查看应用活动;在预发布或线上环境中,每个进程的输出流由运行环境截获,并发送给一个最终处理程序,用于查看或是长期存档。 |
Oops, something went wrong.