I'm currently with with a Progress ERP database, which has two connection brokers: 4GL (aka ABL-used by the "desktop" apps) and SQL-92 (for any other language to connect, using ODBC or JDBC).
The number of connections is a little unbalanced, being 80% for 4GL (used by Progress GUI Apps - the legacy) against 20% for SQL-92. That's something that we can't change.
A few web apps written in PHP and Java needs to connect to the SQL-92 broker, and this number will increase in the next year. If each one of those applications simply connects or keep a connection pool for themselves, the number of connections will reach it's limit soon.
In order to solve this problem, I was thinking about how to maximize the use of those limited connections. My first idea is to centralize access to the database into a Rest Web Service using a connection pool (JDBC or ODBC).
The clients could send SQL queries (alongside some metadata) through an HTTP request. The Web Service then sends the query to the proper database using a connection pool.
Is it a viable solution or a problematic one?
PS.: One of my concerns with normal web services (which takes a request and then queries the database) is that every team would need to change this web service app when they need something new, creating a bottleneck for the teams.