纯粹在内存中运行Neo4j而没有任何持久性 [英] Running Neo4j purely in memory without any persistence
问题描述
我不想保留任何数据,但仍希望使用Neo4j进行图形遍历和算法功能。在嵌入式数据库中,我配置了 cache_type = strong
,在所有写入之后,我将事务设置为失败。但是我的写入速度(节点,关系创建速度)很慢,这在我的过程中成为一个巨大的瓶颈。
I don't want to persist any data but still want to use Neo4j for it's graph traversal and algorithm capabilities. In an embedded database, I've configured cache_type = strong
and after all the writes I set the transaction to failure. But my write speeds (node, relationship creation speeds) are a slow and this is becoming a big bottleneck in my process.
所以,问题是,Neo4j可以在没有任何持久性方面的情况下运行吗,就像纯API一样?我尝试过像JGraphT这样的其他人,但那些没有Neo4j提供的遍历机制。
So, the question is, can Neo4j be run without any persistence aspects to it at all and just as a pure API? I tried others like JGraphT but those don't have traversal mechanisms like the ones Neo4j provides.
推荐答案
据我所知, Neo4J数据存储和Lucene索引始终写入文件。至少在Linux上,您可以设置一个 ramfs
归档系统来将文件保存在内存中。
As far as I know, Neo4J data storage and Lucene indexes are always written to files. On Linux, at least, you could set up a ramfs
filing system to hold the files in-memory.
另见:
- Loading all Neo4J db to RAM
这篇关于纯粹在内存中运行Neo4j而没有任何持久性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!