·8 分钟
7天用 Go语言/golang 从零实现 ORM 框架 GeeORM 教程(7 days implement golang object relational mapping framework from scratch tutorial),动手写 ORM 框架,参照 gorm, xorm 的实现。介绍了 SQLite 的基础操作(连接数据库,创建表、增删记录等),使用 Go 标准库 database/sql 操作 SQLite 数据库,包括执行(Exec),查询(Query, QueryRow)。
·3 分钟
SQLite 常见的使用命令。包括数据库的安装与连接,表(table)的创建(create)与删除(delete),记录的插入(insert)删除(delete)查询(select)改(update),以及事务(transaction)等操作。
·3 分钟
7天用 Go语言/golang 从零实现 ORM 框架 GeeORM 教程(7 days implement golang object relational mapping framework from scratch tutorial),动手写 ORM 框架,参照 gorm, xorm 的实现。功能包括对象和表结构的相互映射,表的创建删除(table),记录的增删查改,事务支持(transaction),数据库迁移(migrate),钩子(hooks)等。
·4 分钟
7天用 Go语言/golang 从零实现分布式缓存 GeeCache 教程(7 days implement golang distributed cache from scratch tutorial),动手写分布式缓存,参照 groupcache 的实现。本文介绍了使用 protobuf(protocol buffer) 进行节点间通信,编码报文,提高效率
·4 分钟
7天用 Go语言/golang 从零实现分布式缓存 GeeCache 教程(7 days implement golang distributed cache from scratch tutorial),动手写分布式缓存,参照 groupcache 的实现。本文介绍了缓存雪崩、缓存击穿与缓存穿透的概念,使用 singleflight 防止缓存击穿,实现与测试。
·8 分钟
7天用 Go语言/golang 从零实现分布式缓存 GeeCache 教程(7 days implement golang distributed cache from scratch tutorial),动手写分布式缓存,参照 groupcache 的实现。本文介绍了为 GeeCache 添加了注册节点与选择节点的功能,并实现了 HTTP 客户端,与远程节点的服务端通信。