Mario Dennis
Mario Dennis

Reputation: 3016

How does the Embedded Neo4j actually work?

I am new to neo4j and based on the reading I have done so far it seem there are two ways to interact with neo4j using Neo4j REST and Embedded. Where I am a little confused is does the Embedded option only give you the ability use the native Neo4j API to manipulate the datastore or can you also embed Neo4j and package it with your java application and if so how would I go about doing it?

Upvotes: 3

Views: 732

Answers (1)

AGupta
AGupta

Reputation: 5734

As far as I know, Embedded term coined out to integrate neo4j with your application. In embedded mode, your db is locked and your application is solely authorized to access it. You can not access your db from any where else as far as your application is running and accessing it.

Where as in Neo4j Rest or Say Neo4j Server support REST API through which you can perform all the data store related operation via API call. In Rest API mode, you can handle your db externally using Neo4j GUI console along with your application.

Performance wise, I found embedded mode is much faster than Server mode.

does the Embedded option only give you the ability use the native Neo4j API to manipulate the datastore

You can use either of mode (Server REST API mode or embedded mode) to manipulate datastore.

Package with Java Application

it depends on your application configuration, in embedded mode you generally don't need external neo4j server running. You just need to explicitly mention your db path along with other configuration (I have used Spring data neo4j). Where as in Neo4j Server mode, you will require neo4j server running.

You can have look on this thread as well.

Upvotes: 4

Related Questions