简体   繁体   English

Rails和CouchDB - 架构问题

[英]Rails and CouchDB - Architectural Concerns

I am working on a project that is going to use CouchDB for flexible storage of documents. 我正在开发一个项目,该项目将使用CouchDB灵活存储文档。 The requirements of my system are a neat match for CouchDB for storage. 我的系统要求与CouchDB存储的完美匹配。

BUT

My question really boils down to this: Should I keeop using ActiveRecord and MySQL as well ... there are a raft of handy Plugins that are all readily available for use with ActiveRecord (such as authentication and access control). 我的问题实际上归结为:我是否应该使用ActiveRecord和MySQL ...还有一大堆方便的插件可以随时用于ActiveRecord(例如身份验证和访问控制)。 Just wondering if the advantages of leveraging existing plugins is worth the extra management overhead and possible integration issues (working across disparate datastores). 只是想知道利用现有插件的优势是否值得额外的管理开销和可能的集成问题(跨不同的数据存储区工作)。

It is not uncommon to have to deal with several persistent stores in a single application. 在单个应用程序中处理多个持久存储的情况并不少见。 A very common approach is to use a relational database that stores paths pointing to files that are stored in a file system. 一种非常常见的方法是使用关系数据库来存储指向存储在文件系统中的文件的路径。

So you might think as CouchDB as a special "file system" for a special part of your data model. 因此,您可能会认为CouchDB是数据模型特殊部分的特殊“文件系统”。

Also, in larger applications, multiple stores and complex physical architectures are quite common, so don't be shy of using more than one persistent store for your models. 此外,在较大的应用程序中,多个存储和复杂的物理体系结构非常常见,因此不要羞于为模型使用多个持久性存储。

You can use both; 你可以两个都用; Some models can still be ActiveRecord, and others can be CouchDB. 有些模型仍然可以是ActiveRecord,其他模型可以是CouchDB。

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

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