https://github.com/andygeiss/cloud-native-store
A Go-based key-value store showcasing cloud-native patterns like transactional logging, data sharding, encryption, TLS, and circuit breakers. Built with hexagonal architecture for modularity and extensibility, it includes a robust API and in-memory storage for efficiency and stability.
https://github.com/andygeiss/cloud-native-store
circuit-breaker cloud-native data-sharding debounce go hexagonal-architecture in-memory-storage key-value-store open-source retry tls-security transactional-logging
Last synced: 11 months ago
JSON representation
A Go-based key-value store showcasing cloud-native patterns like transactional logging, data sharding, encryption, TLS, and circuit breakers. Built with hexagonal architecture for modularity and extensibility, it includes a robust API and in-memory storage for efficiency and stability.
- Host: GitHub
- URL: https://github.com/andygeiss/cloud-native-store
- Owner: andygeiss
- License: mit
- Created: 2024-12-19T14:32:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-11T09:23:59.000Z (over 1 year ago)
- Last Synced: 2025-04-04T13:15:49.138Z (about 1 year ago)
- Topics: circuit-breaker, cloud-native, data-sharding, debounce, go, hexagonal-architecture, in-memory-storage, key-value-store, open-source, retry, tls-security, transactional-logging
- Language: Go
- Homepage:
- Size: 166 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloud Native Store
[](https://github.com/andygeiss/cloud-native-store/blob/master/LICENSE)
[](https://github.com/andygeiss/cloud-native-store/releases)
[](https://goreportcard.com/report/github.com/andygeiss/cloud-native-store)
[](https://app.codacy.com/gh/andygeiss/cloud-native-store/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://app.codacy.com/gh/andygeiss/cloud-native-store/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
**Cloud Native Store** is a Go-based key-value store showcasing cloud-native patterns like transactional logging, data sharding, encryption, TLS, and circuit breakers. Built with hexagonal architecture for modularity and extensibility, it includes a robust API and in-memory storage for efficiency and stability.
## Project Motivation
The motivation behind **Cloud Native Store** is to provide a practical example of implementing a key-value store that adheres to cloud-native principles. The project aims to:
1. Demonstrate best practices for building scalable, secure, and reliable cloud-native applications.
2. Showcase the use of hexagonal architecture to enable modular and testable code.
3. Offer a reference implementation for features like encryption, transactional logging, and stability mechanisms.
4. Inspire developers to adopt cloud-native patterns in their projects.
## Project Setup and Run Instructions
Follow these steps to set up and run the **Cloud Native Store**:
### Prerequisites
1. Create an encryption key by running the following command:
```bash
just genkey
```
2. Create an `.env` file and replace the following values besides `HOME_PATH` with your own:
```env
CLIENT_TIMEOUT="5s"
ENCRYPTION_KEY="0a0375de7bd186c2f8d80ef94e5f3d357462f594ca6785d4779f52bcb2b65b85"
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
GITHUB_REDIRECT_URL="http://localhost:8080/auth/callback"
GITHUB_SCOPE="user:read"
HOME_PATH="/ui"
PORT="8080"
SERVER_IDLE_TIMEOUT="5s"
SERVER_READ_HEADER_TIMEOUT="5s"
SERVER_READ_TIMEOUT="5s"
SERVER_WRITE_TIMEOUT="5s"
STORE_BREAKER_THRESHOLD="5"
STORE_DEBOUNCE_PER_SEC="10"
STORE_RETRY_DELAY="5s"
STORE_RETRY_MAX="3"
STORE_SHARDS="2"
STORE_TIMEOUT="5s"
```
### Commands
#### Test the Service
To run unit tests:
```bash
just test
```
This will execute tests for the core service logic.
#### Run the Service
To start the service:
```bash
just run
```
#### How to Test
After running the service, you can verify its health by visiting the UI in your browser:
[http://localhost:8080/ui](http://localhost:8080/ui)