Database Reference
In-Depth Information
In embedded mode, Neo4j can be used by any client code that's capable of running within
a JVM. As figure 10.1 illustrates, you can use the embedded mode directly with pure
Java clients, which make direct use of the core Neo4j libraries, or indirectly, through ad-
ditional language-specific bindings and frameworks
provided by various communities
for other JVM-based languages.
Inservermode,clientcodeinteractswiththeNeo4jserverviatheHTTPprotocol,specific-
ally via a well-defined REST API, with additional options being available to extend this
RESTfunctionalitywhenrequired.TheAPIcanbeuseddirectlybyanyHTTP-enabledcli-
ent
,or,tomakedevelopmentlifealittleeasier,byusingoneoftheremoteRESTclient
APIs available for a variety of different languages and frameworks . With the inherent
network latency introduced in the server mode, performance is naturally not going to be
as good as accessing the database using native code directly. To add more flexibility to the
server offering, server plugins and unmanaged extensions can also be used to bolster
performanceandfunctionality.We'llbecoveringserverpluginsandextensionslaterinthis
chapter.
Note
All of the coding examples you've seen in the topic so far have used an embedded mode
setup. Embedded mode is a great way to experiment with Neo4j, and it's often used to ex-
plore what Neo4j is capable of. Even if you decide to use the server mode, there will still
beopportunitiestomakeuseofnativeAPIsontheserveritself,andsometimesitmayeven
be necessary. Additionally, with the REST API often just providing a façade over the raw
embedded API, knowing and understanding exactly how the embedded APIs work can be
very useful. Understanding embedded semantics and options will go a long way toward
helping you get the most out of your setup, even if you opt for a server-based setup.
10.2. Embedded mode
All the examples we've looked at so far have used the embedded mode, so it makes sense
for us to explore this approach in more depth first. To clarify, embedded mode does not
refer to the embedding of the actual physical database on disk with your application, but
Search WWH ::




Custom Search