问题描述
在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.
谈话对 Emil Eifrem 关于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.
- REST API不是事务性的.
- 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插件/扩展,它也可以在内部使用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和图形数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!