简体   繁体   English

Rails应用程序和多个数据库实例

[英]Rails application and multiple database instance

can any one suggest good developemt approach to the website.. 任何人都可以提出对网站的良好开发方法。

Hosted webapplicaion, with SAAS approach, different university when registering through the site, they should have their own instance of database to manage their details. 使用SAAS方法托管的Web应用程序,通过网站注册时,不同的大学都应该使用自己的数据库实例来管理其详细信息。

1) subdomain approach - X copies of application connecting to their own database, each copy of app will have different database connection in their yml file 1)子域方法-应用程序的X副本连接到自己的数据库,每个应用程序副本在其yml文件中具有不同的数据库连接

2) One application, with multiple database instances 2)一个应用程序,具有多个数据库实例

I think that it's better to have only one app runnig, instead of X copies, as you might end up in a "configuration hell" in which each uni has a different version of the app deployed. 我认为最好只运行一个应用程序,而不要运行X副本,因为您可能会遇到一个“配置地狱”,其中每个uni都部署了不同版本的应用程序。

One alternative that you haven't mentioned is mix of the two approaches, to have one application with subdomains, and each subdomain talks to a different schema. 您没有提到的一种替代方法是将两种方法混合使用,以使一个应用程序具有子域,并且每个子域都使用不同的架构。 In this case you have only one app deployed and the data from each uni is kept in isolation from the others. 在这种情况下,您仅部署了一个应用程序,每个uni的数据与其他应用程序隔离。

I'm building a small app (with the idea of reselling...maybe) which would benefit from this approach, if you want, we can join forces (:p) to build a small proof of concept. 我正在构建一个小型应用程序(可能具有转售...的想法),该应用程序将从这种方法中受益,如果您愿意,我们可以联手(:p)构建一个小型概念证明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM