Gus
Gus

Reputation: 954

how to use one database per tenant with ruby on rails

I came into an uncommon problem, my client have 3 stores, and wants a web application to manage each store separately. This would be a common multi tenant approach, but there is an additional requirement: the client don't want to rely on an internet connection. Therefore I can think of 2 solutions, on both there must be a server on each store with 1 instance of the database and 1 instance of the application running, if the internet connection fail, the client can use the application local instance.

I would like to know the best architecture on this case. What would you do ?

Upvotes: 2

Views: 701

Answers (1)

Gus
Gus

Reputation: 954

Answer by DbCharmer developer Oleksiy Kovyrin:

"..if you use AR in a multi-process (single-threaded) environment, your case of having separate connections per-client is definitely possible.."

Upvotes: 1

Related Questions