Neo4J 适合 Clojure 吗?
我发现关系数据库非常适合 Clojure,因为集合函数(项目/连接/联合等)非常好地映射到数据库模式,使得 Clojure 几乎完美适合与数据库一起使用。
我想知道 Clojure 如何与像 Neo4j 这样的图形数据库相适应?
I have found that relational databases are a very good fit for Clojure as the set functions (project/join/union etc) map very nicely to a database schema making Clojure almost a perfect fit for using with databases.
I was wondering how Clojure fits in with graph databases like Neo4j however?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Neo4J 在此处和此处 和此处
您可以获取leiningen 和 maven 配置 来自 clojars
franz.com/agraph/allegrograph/" rel="noreferrer">allegrograph 是另一个类似的图形数据存储,广泛clojure 支持。所以有一些证据表明答案可能是肯定的!
图存储非常适合不可变树,这可能比集合更适合 Clojure,但这都是相当主观的。我能给出的最客观的答案是指出图形存储/三重存储的现有使用。
Neo4J has clojure'ey bindings here and here and here
you can get the leiningen and maven config for each of these from clojars
allegrograph is another similar graph data store that is widely supported in clojure. so there is some evidence that the answer may be yes!
graph stores lend them selves well to immutable trees which may be an even better fit to Clojure than sets but this is all fairly subjective. The most objective answer I can give is to point to existing use of graph-stores/triple-stores.
Mark Watson 的书(免费 pdf 版本:http://www.markwatson.com/opencontent/book_java.pdf )是他去年自行出版的一本不太出名的 Clojure 书籍,涵盖了一些有用的图形技术,主要是 allegrograph。
我本人对图数据库库没有太多经验,但上面引用的书提到neo4j针对遍历图进行了优化,而allegrograph针对子图匹配进行了优化。因此,选择可能取决于您的具体应用。
如果你选择 allegograph,如果你购买了他的书的副本,该书的作者将放弃他的包装上的 AGPL 许可证以供生产使用,当然可以在许可证的条件下自由使用 https://github.com/mark-watson/java_practical_semantic_web
clojure-neo4j 包装器库存在,但尚不清楚它是否会被代码腐烂或准备好在给定最后提交日期的情况下使用 https://github.com/JulianMorrison/neo4j-clojure。然而,mattrepl 最近更新的分支并不是很久以前的: https://github.com /mattrepl/clojure-neo4j.git
Mark Watson's book (free pdf version: http://www.markwatson.com/opencontent/book_java.pdf), a lesser known Clojure book he self-published last year, covers some useful graph technology, mainly allegrograph.
I myself don't have much experience with graph db libraries, but the above-cited book mentions that neo4j is optimized to traverse graphs, whereas allegrograph is optimized for subgraph matching. So the choice will likely depend on your specific application.
If you go with allegograph, the author of that book waives the AGPL license on his wrappers for production use if you buy copies of his book, and of course can be used under the conditions of the license freely https://github.com/mark-watson/java_practical_semantic_web
The clojure-neo4j wrapper library exists, though it's unclear if it would be code-rotted or ready for use given the last commit date https://github.com/JulianMorrison/neo4j-clojure. The most recently updated fork, by mattrepl, however was not that long ago: https://github.com/mattrepl/clojure-neo4j.git