Databases Reference
In-Depth Information
GC behaviors
When running in embedded mode, Neo4j is subject to the garbage collection (GC)
behaviors of the host application. Long GC pauses can affect query times. Further,
when running an embedded instance as part of an HA cluster, long GC pauses can
cause the cluster protocol to trigger a master reelection.
Database life cycle
The application is responsible for controlling the database life cycle, which includes
starting it, and closing it safely.
Embedded Neo4j can be clustered for high availability and horizontal read scaling just
as the server version. In fact, we can run a mixed cluster of embedded and server in‐
stances (clustering is performed at the database level, rather than the server level). This
is common in enterprise integration scenarios, where regular updates from other sys‐
tems are executed against an embedded instance, and then replicated out to server
instances.
Server mode
Running Neo4j in server mode is the most common means of deploying the database
today. At the heart of each server is an embedded instance of Neo4j. Some of the benefits
of server mode include:
REST API
The server exposes a rich REST API that allows clients to send JSON-formatted
requests over HTTP. Responses comprise JSON-formatted documents enriched
with hypermedia links that advertise additional features of the dataset.
Platform independence
Because access is by way of JSON-formatted documents sent over HTTP, a Neo4j
server can be accessed by a client running on practically any platform. All that's
needed is an HTTP client library. 3
Scaling independence
With Neo4j running in server mode, we can scale our database cluster independ‐
ently of our application server cluster.
Isolation from application GC behaviors
In server mode, Neo4j is protected from any untoward GC behaviors triggered by
the rest of the application. Of course, Neo4j still produces some garbage, but its
impact on the garbage collector has been carefully monitored and tuned during
development to mitigate any significant side effects. However, because server
3. A list of Neo4j remote client libraries, as developed by the community, is maintained at http://bit.ly/YEHRrD .
Search WWH ::




Custom Search