Neo4j: is it a in-memory graph database?

不羁岁月 提交于 2019-11-30 17:45:00

问题


I have worked with bit older version of Neo4j i.e. 1.8.x. both embedded and REST mode. but I never heard that it store data in-memory. Recently I've been through Neo4j page which says 3 different type of access to neo4j viz:

  1. neo4j server i.e. REST mode
  2. embedded mode
  3. in-memory

How Neo4J works with data in-memory ? and when it was implemented ? was it there from older version i.e. 1.8.x ? or just added in newer version ? any additional changes required in configuration such as Spring data neo4j ?

My findings
I've heard about in-memory database that they handle most of the task in-memory i.e. RAM. for e.g. VoltDB and Redis. (for optimized performance).


回答1:


Neo4j features a stripped down variant called ImpermanentGraphDatabase. This one is intended to be used for testing only. E.g. when you develop a graph enabled application your unit tests might use it. It is not recommended to use ImpermanentGraphDatabase for real life scenarios with large amounts of data.

To use ImpermanentGraphDatabase you typically start with TestGraphDatabaseFactory, this one resides in the neo4j-kernel jar with classifier tests, see in the reference manual as well.

Regardless if you're using Neo4j in embedded or server mode, multiple layers of caches get used to make your queries as fast as possible, for details look in the reference manual as well.

To sum up: Neo4j is a transactional, ACID compliant graph database benefitting from your provided amount of RAM by caching. But I won't consider this being a in-memory database.



来源:https://stackoverflow.com/questions/25481353/neo4j-is-it-a-in-memory-graph-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!