Our company is designing a new ERP based on microservices. The reason we want to implement microservices is because we noticed that some critical parts of the old ERP are being heavily used by our customers and as we plan to grow our business in the a period of 2 years we want to be able to deploy more instances in new servers as required at any given moment.
This is the very first project we do using microservices so there are many discussions about the design, what should be split into several microservices and what should stay together.
The old version of this ERP is giving service to several customers. Some of those customers requested us to have the application in our servers, but some parts of the DB on their servers (Sensitive information).
Because of that some people on the developer team suggested to build a microservice which only task would be to execute queries, receiving all the data needed to make a connection to the required database in order to connect to the customers DBs when required. Most of the team agreed with the idea, but some of us are not sure about it.
We don't like the idea of passing the data around like that and are concerned with the overall performance. Our concerns are because we think that calling this service every time we need data from the DB could take much time making the call, executing the query, parsing the result to json and then parsing again to the objects in the caller code.
The question is about this specific microservice whose only task will be to execute queries for other services: Would such a execute-queries-only microservice be a good idea?