https://github.com/k5924/udpcacheserver
Simple key value store queryable using a cli client over udp
https://github.com/k5924/udpcacheserver
cache cli client-server docker docker-compose dockerfile encoder-decoder gradle groovy java sbe udp
Last synced: 8 months ago
JSON representation
Simple key value store queryable using a cli client over udp
- Host: GitHub
- URL: https://github.com/k5924/udpcacheserver
- Owner: k5924
- Created: 2025-05-05T10:11:43.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-05-05T11:13:50.000Z (11 months ago)
- Last Synced: 2025-06-16T13:52:19.505Z (9 months ago)
- Topics: cache, cli, client-server, docker, docker-compose, dockerfile, encoder-decoder, gradle, groovy, java, sbe, udp
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UDPCacheServer
This is a UDP Cache Server built in Java.
## Functionality:
### Client Operations
- GET a value from a key in the cache
- PUT a key value pair in the cache
- DELETE a key value pair from the cache
- HEARTBEAT to check if the server is alive
These operations can be conducted from the clients CLI.
## Architecture
### Client
- Client has a Sender and Receiver Thread so you can always receive responses
### Server
- The server has a main thread which spawns threads up to N CPUs (available to the system) to handle N number of clients at a time. On my machine, I have 8 cores so my machine can handle 8 connections at a time.
## Improvements
- Need to add tests as nothing has any tests around them
- Could improve logic in Cache as its very simple right now (just uses a ConcurrentHashMap so there are probably tons of race conditions in there)
- Use a buffering mechanism to batch up requests to handle on the server