go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
805 stars 123 forks source link

[FR] Pluggable storage engines? #562

Open akamensky opened 1 year ago

akamensky commented 1 year ago

Is your feature request related to a problem? Please describe. Current storage relies on whisper type. A brief look into code seems it is very intertwined with the code.

Describe the solution you'd like An abstraction interface to the storage to be able to experiment with alternative storage types or even have multiple storage types shipped with go-carbon.

Additional context N/A

deniszh commented 1 year ago

Hi @akamensky Not sure if easy/possible to do, because indeed whisper is everywhere. I had idea to implement alternative storage as whisper compatible by interface, which make sense IMO, because we have enough scalable but not whisper compatible storage for Graphite - Victoria Metrics, InfluxDB, Graphite Clickhouse etc.

akamensky commented 1 year ago

@deniszh I am quite interested in alternative storage options and am willing to implement at least one, but I need a list of methods that such storage driver need to implement.

deniszh commented 1 year ago

Hi @akamensky You can check e.g. https://pkg.go.dev/github.com/go-graphite/go-whisper or go-whisper code. But as I said currently go-carbon is quite intertwined with whisper, maybe it's easier to build new engine based on carbon-clickhouse