-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-tenancy connection management #83
Comments
Hi, note that the Does this answer your question? |
I'm sorry but I still don't get it. |
|
I guess I've learned something new about interfaces today @ewoutp. |
Hey guys, do you have any recommendations on how to approach this task?
I need to manage a pool of connections in a multi-tenancy environment, means I have multiple DBs to talk to. Since I cannot afford creating a new Db connection upon each request, I have to create a pool of connections.
The way how DB connection is meant to be created is to:
Implementation of the #3 uses a copy of the conn from #1. What it means to me is that even if I maintain my own pool of the db objects, every single one will hold a copy of the identical connections (in fact it's a connection pool). Since Database constructor is defined as private (newDatabase), even if I want to write my own implementation of #3 (with a pointer to the conn), I cannot bypass it.
Any suggestion on how to address the issue?
The text was updated successfully, but these errors were encountered: