Skip to content

GallifreyGoTutoural/ggt-dist-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ggt-dist-cache

English | 中文

ggt-dist-cache is a project that aims to handwrite a distributed cache system as an imitation of groupcache. The goal is to gain a deeper understanding of the underlying principles and design patterns of groupcache and eventually implement a simplified version of a distributed cache system called "gdc".

The "ggt" in the project name stands for "Gallifrey's GoTutorial," and "gdc" is the abbreviation for "ggt-dist-cache."

The primary reference for this project is the blog post by GeekTutu: Building a Distributed Cache in 7 Days with Go. For more details and considerations regarding the program design, please refer to the original blog post.

Development Plan

  • Implement LRU cache eviction algorithm.
  • Implement concurrent control of LRU cache using sync.Mutex.
  • Implement the core data structure, Group, which calls the callback function to obtain the source data when the cache is not present.
  • Set up an HTTP Server.
  • Start the HTTP Server and test the API.
  • Implement consistent hashing.
  • Register nodes and select nodes using the consistent hashing algorithm.
  • Prevent cache breakdown using singleflight.
  • Use protobuf for inter-node communication and message encoding.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages