Reputation: 954
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.
asynchronous database replication - each store local database is a replica of the online server database.
make rails connect to a different database depending on the selected store. In this case there would be only 3 local databases (each at one store) to which the application online instance connects to. I saw Guy's speech, and read about magic_multi_connections (magicmodels.rubyforge.org/magic_multi_connections), but it seem to be obsolete. DbCharmer seems to be a possible solution but I'm not sure if it will do it.
other posts related:
I would like to know the best architecture on this case. What would you do ?
Upvotes: 2
Views: 701