问题描述
我目前正在为 neo4j 使用嵌入式 python 绑定.我目前没有任何问题,因为我的图非常小(稀疏且最多 100 个节点).我正在开发的算法涉及对图的大量遍历,更具体地说,一般是对图以及不同子图的 DFS.将来我打算在大型图(据说是稀疏的并且有数百万个节点)上运行该算法.
I am currently using embedded python binding for neo4j. I do not have any issues currently since my graph is very small (sparse and upto 100 nodes). The algorithm I am developing involves quite a lot of traversals on the graph, more specifically DFS on the graph in general as well as on different subgraphs.In the future I intend to run the algorithm on large graphs (supposedly sparse and with millions of nodes).
阅读了与 python/neo4j 绑定性能相关的不同线程这里,这里,我想知道我是否应该已经切换到 Python 的某些 REST API 客户端(如bulbflow、py2neo、neo4jrestclient),直到我无法更改所有代码为止.
Having read different threads related to the performance of python/neo4j bindings here, here, I wonder whether I should already switch to some REST API client for Python (like bulbflow, py2neo, neo4jrestclient) until I am too far to change all code.
不幸的是,我没有找到任何全面的信息来源来比较不同的方法.
Unfortunately, I did not find any comprehensive source of information to compare different approaches.
有人可以对这个问题提供一些进一步的见解吗?在选择其中一个选项时,我应该考虑哪些标准?
Could anyone provide some further insight into this issue? Which criteria should I take into account when choosing one of the options?
推荐答案
Django 是一个 MVC Web 框架,因此如果您要成为 Web 应用程序,您可能会对它感兴趣.
Django is an MVC web framework so you may be interested in that if yours is to be a web application.
从 py2neo(我是其作者)的角度来看,我试图通过在适当的情况下自动使用批处理执行机制以及提供强大的 Cypher 支持来努力专注于性能.我最近还做了很多工作来为索引中的唯一性管理提供良好的选项 - 特别是 get_or_create
和 add_if_none
方法.
From the point of view of py2neo (of which I am the author), I am trying to focus hard on performance by using the batch execution mechanism automatically where appropriate as well as providing strong Cypher support. I have also recently put a lot of work into providing good options for uniqueness management within indexes - specifically, the get_or_create
and add_if_none
methods.
这篇关于选择合适的方式在 Python 中使用 Neo4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!