Skip to content

ehrktia/memcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memcache

in memory cache via http api

<iframe width="560" height="315" src="https://vimeo.com/1152877214?share=copy&fl=sv&fe=ci" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

start locally

COORDINATOR=true go run cmd/main.go

endpoints

/save

to save data in to cache
data format

{
    "key":"some-key",
    "value":"some-value"
}

req type - POST

/get

to retrieve data from cache

data format

{
    "key":"some-key"
}

about

this is a concurrent implementation of cache via http. Can be used across any service layer as a stage or landing for some data which you require to consume / refer / lookup

distributed

WIP

Coordinator
Will be used to manage multiple instance of cache and sync data between instances. Available in coordinator

how to start

cd coordinator && zig build run  

this will start coordinator and emit 5 consecutive multicast messages with port number available for communication

container
To build image from root of the project

podman build -t coordinator:latest --squash-all -f coordinator/Dockerfile ./coordinator/

To run the container

podman run --name coordinator --publish-all -h coordinator -d localhost/coordinator:latest

testing

  • run the local version of coordinator and use the go run command to test

About

http cache with persistance using WAL file

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages