https://github.com/tungct/go-keyvaluedb
https://github.com/tungct/go-keyvaluedb
golang grpc redis
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/tungct/go-keyvaluedb
- Owner: tungct
- Created: 2018-03-03T03:39:40.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-28T03:51:27.000Z (about 8 years ago)
- Last Synced: 2025-01-14T14:35:22.830Z (about 1 year ago)
- Topics: golang, grpc, redis
- Language: Go
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-keyvaluedb
- Client put and get message key-value from server by grpc protocol
- Server put message to mem-cache (map key-value), if cache full, put message to Redis, LevelDb
- Worker in Server check message in server, if message have time out, delete it
- Worker check message in redis or levelDb, if it have hight-frequency, put it to cache (or redis) by threshold
## Libs
- go-Redis : https://github.com/go-redis/redis
- go-LevelDb : https://github.com/syndtr/goleveldb/leveldb
- decode-config : https://github.com/BurntSushi/toml
## Config Redis and Server
```
config/redis.conf
cofig/server.conf
```
## Getting started
run server :
```
server/server.go
$ go run server.go
```
run test put client with 10 goroutine in during 5 time second :
```
client/putclient
$go run putclient.go
```
run test get client with 10 goroutine in during 5 time second :
```
client/getclient
$go run getclient.go
```