Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can neo4j be run in memory only?

Is it possible to run Neo4j in memory only without any persistent database/file storage?

The data coming from several xml/json files, and we have to load them into jvm heap memory by using ConcurrentHashmap. Since the data objects have dependencies (parent-child, child can link back to parent), we want to maintain an object graph. Is there any way to use Neo4J in this case; or can you suggest any framework that can support maintaining this kind of object graph.

Thanks you.

like image 511
user3246920 Avatar asked Jan 29 '14 01:01

user3246920


2 Answers

Neo4j has is an ImpermanentDataBase that is intended for unit testing, but it runs in memory.

See http://docs.neo4j.org/chunked/stable/tutorials-java-unit-testing.html.

like image 195
cybersam Avatar answered Sep 18 '22 12:09

cybersam


Now, neo4j has first-class support for embedded database unlike the one used only during testing. More details at https://neo4j.com/docs/java-reference/current/tutorials-java-embedded/include-neo4j/.

like image 32
Vikdor Avatar answered Sep 18 '22 12:09

Vikdor