Meteor.js 可以用 Cassandra 而不是 MongDB 吗? [英] Meteor.js possible with Cassandra instead of MongDB?

查看:24
本文介绍了Meteor.js 可以用 Cassandra 而不是 MongDB 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在启动一个创建客户支持系统的项目.对于这个系统,我查看了 Meteor.js,看起来很有趣.问题是我们想使用 Cassandra 构建系统的其余部分.

I'm at the start of a project to create a customer support system. For this system I've looked at Meteor.js, which looks very interesting. The thing is that we want to build the rest of our system using Cassandra.

所以我的问题如下;流星.js 也可以与 Cassandra 而不是 MongoDB 一起使用吗?是否有任何现成的代码可以做到这一点,或者我们是否需要自己编写大量的兼容性代码?

So my question is as follows; can meteor.js also be used with Cassandra instead of MongoDB? Are there any ready pieces of code to do this, or would we need to write a substantial amount of compatibility code ourselves?

推荐答案

你可以在 Meteor 中使用任何你想要的数据库,但是你会失去三个 该框架的七个关键优势:

You can use any database you want with Meteor, but you'll lose three of the seven key benefits of the framework:

数据库无处不在.使用相同的透明 API 访问您的来自客户端或服务器的数据库.

Database Everywhere. Use the same transparent API to access your database from the client or the server.

延迟补偿.在客户端,使用预取和模型模拟以使其看起来像您有零延迟连接数据库.

Latency Compensation. On the client, use prefetching and model simulation to make it look like you have a zero-latency connection to the database.

全栈反应性.将实时设为默认值.所有层,从数据库到模板,应该使事件驱动的接口可用.

Full Stack Reactivity. Make realtime the default. All layers, from database to template, should make an event-driven interface available.

除了 MongoDB 之外,我还将 Redis 和 Postgres 与 Meteor 一起使用.我使用 Meteor Methods 在客户端公开函数以在其他数据库中创建、读取、更新和删除记录.

I use Redis and Postgres with Meteor, in addition to MongoDB. I use Meteor Methods to expose functions on the client to create, read, update and delete records in other databases.

对 Redis 和其他数据库的官方支持在 Meteor 路线图上,目前针对 1.1 版.Meteor 目前的版本是 0.7.0.1,所以这可能不会很快发生.

Official support for Redis and other databases is on the Meteor roadmap, currently targeted for version 1.1. Meteor is currently at version 0.7.0.1, so that's probably not going to happen soon.

如果您想将 Cassandra 等其他数据存储与 Meteor 更紧密地集成,您可能会从 Meteor 的 mongo-livedata 模块.

If you want to integrate another datastore like Cassandra more tightly with Meteor, you would probably start with Meteor's mongo-livedata module.

这篇关于Meteor.js 可以用 Cassandra 而不是 MongDB 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆