Server extensions allow new surfaces to be created in the REST API. Use them if you want fine-grained control over your application's interactions with Neo4j than Cypher provides.
To know more about how to write and test your extensions please read the Neo4j unmanaged server extensions documentation.
Keep in mind
Please be careful with server extensions. You will be able to deploy JAX-RS classes to the server and it’s easy to consume lots of heap space and degrade performance.
We highly encourage to test your server extensions in staging environments before uploading them into production.
Once you have written or downloaded an extension, you will need to pack it in a compressed file. As part of the compressed file you’ll need to add a neo4j-server.properties file, where you’ll put all the needed configuration for your extension, such as where Neo4j will look for it.
Please take the following considerations into account while preparing your server extension to be uploaded:d
- Supported formats: zip, tar, cpio, gz, bz2 and xz.
- Size is limited to 100MB.
- A file can contain multiple .jar files in the top-level directory.
- Only files with jar format or neo4j-server.properties are extracted, the rest will be ignored.
- If a neo4j-server.properties file is found, its content is added to the neo4j-server.properties of the Neo4j process.
- neo4j-server.properties can contain $PLUGIN_ROOT, which will be replaced with the path of the plug-in. This can be used to reference files in the archive.
Graphaware extensions use a neo4j.properties file instead of a neo4j-server.properties file for their configuration. GrapheneDB takes care of this for you automatically. Read more in Graphaware extensions section.
Follow these instructions to add a new server extension to your database:
- Navigate to the Extensions tab of your database dashboard, and click on the New server extension button from the dropdown menu New extension.
- Name your extension in order to be able to identify it afterwards.
- Select the compressed file from your local path and click.
- Do not close your browser window! The upload will stop if you close your browser. If the upload fails, you can click on the Retry button to start it again.
- When the upload completes successfully, you will see a new row in your Extensions list with the status ENABLED - PENDING.
- Before the extension can be available for use, it is necessary to restart the database. To perform this operation, click on the Apply changes button.
- A new window will show you a list of the changes you are going to perform. Please review them and click on Apply changes.
Once the changes are applied, you will see the final status (ENABLED or DISABLED) in the list.
Server extensions and stored procedures are shown together in your Extensions list.
To remove your unmanaged server extensions, navigate to the Extensions tab of your database dashboard, and just click on the Remove link next to the extension.
To remove an extension, it should be DISABLED before you can perform this operation.
This action cannot be undone and will delete your server extension permanently.
GraphAware is a Neo4j Solution Partner that specializes in Neo4j consultancy, training, and development. They develop open-source tools and generic graph database extensions. Below, you can find more specific information about how to integrate GraphAware extensions.
Take into account that you will need to download a compatible version for your database. You can see all the available versions by clicking on the Older Versions link. For instance if your database is running Neo4j 2.2.4, you will need to look for a 2.2.4 version of your GraphAware extension.
Please read the extension readme file carefully. This file will contain all of the needed instructions on how to configure the extension properly.
GraphAware extensions use neo4j.properties instead of neo4j-server.properties because their extensions work both in Server as well as in Embedded mode. You don't have to worry about that, because when a GraphAware plugin is detected, the proper properties file will be used.
Before uploading to GrapheneDB, please ensure you have packaged the extension tarball, the neo4j.properties file, and the framework tarball (if it's required) in a valid format (zip, tar, cpio, gz, bz2 or xz).
Follow the steps described in Server extensions to upload and enable the GraphAware extension.
Neo4j Spatial is a library of utilities for Neo4j that facilitates the enabling of spatial operations on data. Source page: https://github.com/neo4j-contrib/spatial
For some versions of Neo4j, GrapheneDB comes out of the box with the spatial server extension installed.
If you want to use it, you need to enable it from your Extensions area by clicking first on Enable and then on Apply changes.