Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
7

7days-golang

> 编程语言
Open source

7 days golang programs from scratch (web framework Gee, distributed cache GeeCache, object relational mapping ORM framework GeeORM, rpc framework GeeRPC etc) 7

17.0K stars0 likes0 views
WebsiteGitHub

About

7 days golang programs from scratch (web framework Gee, distributed cache GeeCache, object relational mapping ORM framework GeeORM, rpc framework GeeRPC etc) 7

7 days golang programs from scratch

README 中文版本

What can be accomplished in 7 days? A gin-like web framework? A distributed cache like groupcache? Or a simple Python interpreter? Hope this repo can give you the answer.

Web Framework - Gee

Gee is a gin-like framework

  • Day 1 - http.Handler Interface Basic Code
  • Day 2 - Design a Flexiable Context Code
  • Day 3 - Router with Trie-Tree Algorithm Code
  • Day 4 - Group Control Code
  • Day 5 - Middleware Mechanism Code
  • Day 6 - Embeded Template Support Code
  • Day 7 - Panic Recover & Make it Robust Code

Distributed Cache - GeeCache

GeeCache is a groupcache-like distributed cache

  • Day 1 - LRU (Least Recently Used) Caching Strategy Code
  • Day 2 - Single Machine Concurrent Cache Code
  • Day 3 - Launch a HTTP Server Code
  • Day 4 - Consistent Hash Algorithm Code
  • Day 5 - Communication between Distributed Nodes Code
  • Day 6 - Cache Breakdown & Single Flight | Code
  • Day 7 - Use Protobuf as RPC Data Exchange Type | Code

Object Relational Mapping - GeeORM

GeeORM is a gorm-like and xorm-like object relational mapping library

Xorm's desgin is easier to understand than gorm-v1, so the main designs references xorm and some detailed implementions references gorm-v1.

  • Day 1 - database/sql Basic | Code
  • Day 2 - Object Schame Mapping | Code
  • Day 3 - Insert and Query | Code
  • Day 4 - Chain, Delete and Update | Code
  • Day 5 - Support Hooks | Code
  • Day 6 - Support Transaction | Code
  • Day 7 - Migrate Database | Code

RPC Framework - GeeRPC

GeeRPC is a net/rpc-like RPC framework

Based on golang standard library net/rpc, GeeRPC implements more features. eg, protocol exchange, service registration and discovery, load balance, etc.

  • Day 1 - Server Message Codec | Code
  • Day 2 - Concurrent Client | Code
  • Day 3 - Service Register | Code
  • Day 4 - Timeout Processing | Code
  • Day 5 - Support HTTP Protocol | Code
  • Day 6 - Load Balance | Code
  • Day 7 - Discovery and Registry | Code

Golang WebAssembly Demo

  • Demo 1 - Hello World Code
  • Demo 2 - Register Functions Code
  • Demo 3 - Manipulate DOM Code
  • Demo 4 - Callback Code

Issues· 51 open

View all issuesOpen on GitHub
  • #95

    邀请 7days-golang 加入 GithubStarMate,让更多人发现你的作品

    Updated Sep 27, 2026
  • #91

    geecach项目的测试文件BUG反馈

    Updated May 8, 2025
  • #64

    gee-web项目中 路由注册顺序,导致的Bug

    Updated Apr 9, 2025
  • #26

    geerpc 在超时处理方面的 bug

    Updated Mar 27, 2025
  • #86

    提升上网体验,让ChatGPT无障碍交流

    Updated Oct 17, 2024
  • #7

    意见征求,下一个7天实现的项目大家可以推荐下。

    Updated Jun 10, 2024
  • #83

    "*"号路由并未实现

    Updated May 7, 2024
  • #34

    序列化和反序列化问题

    Updated Apr 7, 2024
  • #81

    兔兔大佬考虑再写一个 Raft系列

    Updated Jan 16, 2024
  • #63

    geecache day4 一致性哈希疑问

    Updated Dec 19, 2023

> Tags

Gogolanglearningscratchstarter-project

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言