diff --git a/.vitepress/sidebar/8gu/8gu.ts b/.vitepress/sidebar/8gu/8gu.ts index d56d1b7..e2ca49b 100644 --- a/.vitepress/sidebar/8gu/8gu.ts +++ b/.vitepress/sidebar/8gu/8gu.ts @@ -54,7 +54,7 @@ export function BaGu(): DefaultTheme.SidebarItem[] { collapsed: false, items: [ { text: 'Kubernetes', link: '/8gu/cloud-native/k8s/' }, - // { text: 'CAP', link: '/8gu/cloud-native/cap' }, + { text: 'CAP', link: '/8gu/cloud-native/cap' }, ] }, { diff --git a/.vitepress/sidebar/8gu/cloud-native/cap.ts b/.vitepress/sidebar/8gu/cloud-native/cap.ts new file mode 100644 index 0000000..00c88e8 --- /dev/null +++ b/.vitepress/sidebar/8gu/cloud-native/cap.ts @@ -0,0 +1,13 @@ +import { type DefaultTheme } from 'vitepress' +import { BaGu } from '../8gu' + +export function BaGuCAP(): DefaultTheme.SidebarItem[] { + return [ + ...BaGu(), + { + text: 'CAP', + link: '/8gu/cloud-native/cap', + items: [] + }, + ] +} diff --git a/.vitepress/sidebar/8gu/cloud-native/index.ts b/.vitepress/sidebar/8gu/cloud-native/index.ts index 0025506..103644a 100644 --- a/.vitepress/sidebar/8gu/cloud-native/index.ts +++ b/.vitepress/sidebar/8gu/cloud-native/index.ts @@ -1,8 +1,9 @@ import { type DefaultTheme } from 'vitepress' import { BaGuK8S } from './k8s' - +import { BaGuCAP } from './cap' export function BaGuCloudNative(): DefaultTheme.SidebarMulti { return { + '/8gu/cloud-native/cap': BaGuCAP(), '/8gu/cloud-native/k8s': BaGuK8S(), } } diff --git a/8gu/cloud-native/cap.md b/8gu/cloud-native/cap.md index e0a4189..0437023 100644 --- a/8gu/cloud-native/cap.md +++ b/8gu/cloud-native/cap.md @@ -1,6 +1,10 @@ -# xxx +# 分布式服务环境下的事务处理机制 https://javaguide.cn/distributed-system/protocol/cap-and-base-theorem.html - 幂等设计 -- 并发事务可见性 https://www.bilibili.com/video/BV1uv4y1S7tE/?spm_id_from=333.999.0.0&vd_source=ddc8289a36a2bf501f48ca984dc0b3c1 \ No newline at end of file +- 并发事务可见性 https://www.bilibili.com/video/BV1uv4y1S7tE/?spm_id_from=333.999.0.0&vd_source=ddc8289a36a2bf501f48ca984dc0b3c1 + +## Reference + +- [分布式事务](https://icyfenix.cn/architect-perspective/general-architecture/transaction/distributed.html) \ No newline at end of file diff --git a/8gu/language/c/index.md b/8gu/language/c/index.md new file mode 100644 index 0000000..5ab31ec --- /dev/null +++ b/8gu/language/c/index.md @@ -0,0 +1,10 @@ +# C + +## 保持 C 的精神 + +- 信任程序员 +- 不要妨碍程序员做需要做的事 +- 保持语言精炼简单 +- 只提供一种方法执行一项操作 +- 让程序运行更快,即使不能保证其可移植性 +