上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 30 下一页
摘要: 1. CAP理论 cap理论是分布式系统的理论基石 Consistency (一致性): “all nodes see the same data at the same time”,即更新操作成功并返回客户端后,所有节点在同一时间的数据完全一致,这就是分布式的一致性。一致性的问题在并发系统中不可避 阅读全文
posted @ 2023-11-17 17:32 PEAR2020 阅读(122) 评论(0) 推荐(0)
摘要: Redis 使用的过期删除策略是「惰性删除+定期删除」,删除的对象是已过期的 key。 内存淘汰策略是解决内存过大的问题,当 Redis 的运行内存超过最大运行内存时,就会触发内存淘汰策略,Redis 4.0 之后共实现了 8 种内存淘汰策略,我也对这 8 种的策略进行分类,如下: 阅读全文
posted @ 2023-11-14 20:15 PEAR2020 阅读(13) 评论(0) 推荐(0)
摘要: 1.覆盖索引 covering index: https://blog.csdn.net/cckevincyh/article/details/119655516 2.pk must be a clustered index normal index can be clusted index or 阅读全文
posted @ 2023-11-13 19:49 PEAR2020 阅读(30) 评论(0) 推荐(0)
摘要: 0. create table naming strategy DB, err := gorm.Open(mysql.Open(dsn), &gorm.Config{ NamingStrategy: schema.NamingStrategy{ //TablePrefix: "mxshop_", / 阅读全文
posted @ 2023-11-12 22:50 PEAR2020 阅读(20) 评论(0) 推荐(0)
摘要: type Goods struct { BaseModel CategoryID int32 `gorm:"type:int;not null"` Category Category BrandsID int32 `gorm:"type:int;not null"` Brands Brands } 阅读全文
posted @ 2023-11-12 16:34 PEAR2020 阅读(37) 评论(0) 推荐(0)
摘要: Domain-driven (DDD) is a business-oriented modeling method or architecture method. Traditional data drivers are generally MVC architecture, which is a 阅读全文
posted @ 2023-11-07 18:53 PEAR2020 阅读(22) 评论(0) 推荐(0)
摘要: 1. 为什么有错误? 必须先处理err再defer file.close() func main() { file, err := os.Open("test.go") defer func() { err := file.Close() if err != nil { fmt.Println("c 阅读全文
posted @ 2023-11-07 14:55 PEAR2020 阅读(149) 评论(0) 推荐(0)
摘要: 1. package management go package management1. history2. go modules GOPATH: Unified package storage path- not support version control of dependency pac 阅读全文
posted @ 2023-11-06 20:48 PEAR2020 阅读(42) 评论(0) 推荐(0)
摘要: Service Discovery 1. register & pull config info2. register center itself should be distributed3. health monitorzookeeper(java)consul & etcd consul in 阅读全文
posted @ 2023-11-06 00:40 PEAR2020 阅读(427) 评论(0) 推荐(0)
摘要: 1. support several formats of configuration config.yaml name: 'bobby' port: 12334 main.go to quick start package main import ( "fmt" "github.com/spf13 阅读全文
posted @ 2023-11-03 20:42 PEAR2020 阅读(18) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 30 下一页