Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Multi tenancy with schemas

 Post Reply Post Reply
Author
Fonteles Andre View Drop Down
New Member
New Member
Avatar

Joined: 02 May 2019
Posts: 3
Post Options Post Options   Quote Fonteles Andre Quote  Post ReplyReply Direct Link To This Post Topic: Multi tenancy with schemas
    Posted: 13 May 2019 at 6:03pm
Hi,

Is there any way for aurelius/xdata to  facilitate the use of Multi tenancy with schemas. I saw the example using a bundled database connection but this architecture does not meet the project requirements.
Thank you.

Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2277
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2019 at 7:11pm
What are your project requirements?
Back to Top
Fonteles Andre View Drop Down
New Member
New Member
Avatar

Joined: 02 May 2019
Posts: 3
Post Options Post Options   Quote Fonteles Andre Quote  Post ReplyReply Direct Link To This Post Posted: 13 May 2019 at 9:54pm

We have a limit on the number of concurrent active connections to the database. In this way the initial idea would be to have a pool of active connections that could be used by each database access request, in order to configure the default schema path (SET search_path TO xxxxx). Thank you.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2277
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 14 May 2019 at 7:21pm
Isn't it what the multi tenant does? It shows how to create a multi tenant connection pool which holds several connection pools. For each connection pool ou can provide its size and define the maximum number of connections in the pool.

I don't understand your requirement compared to what exists in the multi tenant demo. I'd kindly ask you to be more detailed and precise in what you need and why the current demo doesn't fit your needs.


Back to Top
Fonteles Andre View Drop Down
New Member
New Member
Avatar

Joined: 02 May 2019
Posts: 3
Post Options Post Options   Quote Fonteles Andre Quote  Post ReplyReply Direct Link To This Post Posted: 20 May 2019 at 9:53pm
Imagine a scenario where we have 2000 different databases with few tables in a single database server. In this case we find it impracticable to have 2000 open connections (one for each database). Our idea is to use postgresql where we will have the "databases" separated by schemas and so with few connections we will be able to attend a large number of requests.
The question is how to set default schema (SET search_path to xxx) for each requested connection request to the pool.

Thank you.
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2277
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2019 at 2:55pm
In this case you cannot have a pool of connections anyway. You will have to setup the connection for each and every incoming request you receive. 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down