I have a small system written in Go with aprox 10 services, and 3 DB (InfluxDB, Postgres, Blockchain) Each service use InfluxDB (some service read, other write), and postgres ( Readonly).
I see 2 options:
In all my services, I use a client to connect directly to DB
- I already have it this way.
- It is easier to write, and more flexible maybe
- All services are coupled to 2 or 3 databases,
- Testing is being quite difficult
I write a REST API in front of InfluxDB, that manage all queries, and systems just invoke those URLs to execute a query
- Unloose all my service from a Influx / Postgres dependency
- Maybe mocking is going to be easier
- Refactoring to ElasticSearch is easier
- Centralized credentials
- more work
- more tedious ?
- Will it bring me something valuable ?
I am looking for advices to take this decision, or maybe, I am asking myself, Will it bring me something valuable ?