An open API service indexing awesome lists of open source software.

https://github.com/asm2212/cacheflow

A lightweight HTTP caching reverse proxy optimized for high-latency, unreliable networks, built in Go.
https://github.com/asm2212/cacheflow

Last synced: 2 months ago
JSON representation

A lightweight HTTP caching reverse proxy optimized for high-latency, unreliable networks, built in Go.

Awesome Lists containing this project

README

          

# CacheFlow

**CacheFlow** is a lightweight HTTP caching reverse proxy written in Go, designed for **high-latency, unreliable network environments**.

> **⚠️ Sprint 0 Foundation Status**: This repository contains the foundation structure only. No business logic is implemented yet.

## 🎯 Sprint 0 - Foundation Complete

✅ **Repository Structure**: Complete Go project layout
✅ **Tooling**: Makefile, linting, and build system
✅ **Documentation**: Architecture and context documentation
✅ **Development Ready**: Ready for Sprint 1 feature development

### 📁 Project Structure

```
cacheflow/
├── cmd/
│ └── serve/
│ └── main.go

├── internal/
│ ├── cache/
│ │ ├── cache.go
│ │ └── lru.go
│ │
│ ├── proxy/
│ │ └── proxy.go
│ │
│ ├── middleware/
│ │ └── cache.go
│ │
│ ├── config/
│ │ └── config.go
│ │
│ └── server/
│ └── server.go

├── docs/
│ └── ETHIOPIAN_CONTEXT.md

├── ARCHITECTURE.md
├── README.md
├── Makefile
├── .golangci.yml
├── go.mod
└── go.sum
```

## 🛠️ Development

### Prerequisites
- Go **1.21+**
- `golangci-lint` for linting

### Installation

```bash
git clone https://github.com/asmareadmasu/cacheflow.git
cd cacheflow
make install-dev
```

### Commands

```bash
make build # Build the application
make test # Run tests
make lint # Run linters
make run # Run the application
make clean # Clean build artifacts
make help # Show all available commands
```

### Linting

Configured linters:
- `govet` - Go vet
- `errcheck` - Error checking
- `staticcheck` - Static analysis
- `ineffassign` - Ineffective assignment detection

## 📋 Sprint 0 Definition of Done

- ✅ Repository structure matches specification
- ✅ `make test` and `make lint` pass
- ✅ README and ARCHITECTURE.md exist
- ✅ No feature or business logic implemented
- ✅ Clean, professional Go repository ready for Sprint 1

## 📖 Documentation

- **[ARCHITECTURE.md](ARCHITECTURE.md)**: System design, interfaces, and trade-offs
- **[docs/ETHIOPIAN_CONTEXT.md](docs/ETHIOPIAN_CONTEXT.md)**: Ethiopian network context and optimization rationale

## 🎯 Success Metrics (Sprint 1 Targets)

- Cache hit latency < 5ms
- ≥ 95% cache hit rate on repeat requests
- 1 upstream call per concurrent cache miss
- Serve stale data on upstream failure

## 🇪🇹 Ethiopian Context

CacheFlow is optimized for regions with:
- High latency networks (500ms-2s RTT)
- Expensive mobile data ($0.50-$2.00/GB)
- Intermittent connectivity
- Power instability

See [docs/ETHIOPIAN_CONTEXT.md](docs/ETHIOPIAN_CONTEXT.md) for detailed engineering analysis.

## 🚀 Next Steps

**Sprint 1** will implement:
- Cache layer with LRU eviction
- HTTP proxy with request forwarding
- Middleware for caching logic
- Metrics and observability

---

*Built with ❤️ for high-latency, bandwidth-constrained environments*