Rails 3 和图形数据库 [英] Rails 3 and graph databases

查看:26
本文介绍了Rails 3 和图形数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Postgresql 上运行的 Rails 3 应用程序需要切换到图形数据库才能成长.它们有很多,它们都提供不同类型的 API,主要是 REST.

A Rails 3 application running on Postgresql needs to switch to a graph database to be able to grow up. There are many of them and they all offer different kind of API, REST mostly.

我受到 谈话的极大启发a href="http://www.youtube.com/watch?v=2ElGO1P8v0c" rel="noreferrer">Emil Eifrem,NeoTechnologies 的首席执行官,关于 Neo4j 可以完成什么.我必须承认,我已经玩过了,这东西绝对是我们需要的,但有几个障碍.

I am highly inspired by talks of Emil Eifrem, CEO of NeoTechnologies, about what can be accomplished with Neo4j. I must confess, I've played with it and this thing is absolutely what we need, but there are several obstacles.

  1. REST API 不是事务性的.
  2. Rails 3 应用在 ruby​​ 1.9.2 上运行,但不是在 jRuby 1.5.3 或 1.6 上运行以实现原生 API.

一些数据库也由 Java 驱动并提供 REST API,因此使用它们不会有任何改变.由于许可证或成本或背后缺乏团队,我们无法选择其他人.

Some databases are also driven by Java and offer REST API, so taking them changes nothing. Someother are not an option for us because of a license or a cost or a lack of team behind them.

我想我遗漏了一些东西,因此希望您能就我们的选择以及哪些可以为我们发挥良好作用提供任何提示、见解或建议.谢谢.

I assume I'm missing something, so would appreciate any tip, insight or advice about what are our options and and what can play well for us. Thanks.

推荐答案

您可以运行 Neo4jrb 在 jruby 1.6 上使用 Rails 3,所以这应该不是问题.

You can run Neo4jrb with Rails 3 on jruby 1.6, so that should not be a problem.

要在此基础上运行事务 (REST) API,您可以轻松编写自己的 Neo4j-Server 插件/extension 也可以在内部使用 Neo4jrb,但会公开一个适合您的域的 API,并且比细粒度的 Neo4j-Server REST API 更简洁.这对于您的客户来说也应该更容易使用,因为它涉及您的术语、词汇和用例.

To run a transactional (REST) API on top of that you can easily write your own Neo4j-Server plugin/extension that could also use Neo4jrb internally but exposes an API that fits your domain and is less verbose/chatty than the fine grained Neo4j-Server REST API. This should also be easier to consume for your clients as it talks in your terms, vocabulary and use-cases.

我们目前正致力于创建一个通用的 (j)ruby 服务器扩展,该扩展能够使用已发布的代码并使其可用作新的 REST 端点.

We're currently working on creating a generic (j)ruby server extension that is able to consume posted code and make it available as new REST endpoints.

这篇关于Rails 3 和图形数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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