Running OrientDB in Server Mode
Running OrientDB in Server Mode
After a normal installation of OpenEMPI the OrientDB server runs embedded within OpenEMPI. There is an option of running OrientDB in remote server mode. The benefit of this approach is that each JVM is configured for a specific purpose and is dedicated to running a single application as opposed to sharing JVM resources across both the OpenEMPI and OrientDB servers. The disadvantage is that the overall system performance will decline somewhat when the database is running in remote mode.
Note: Make sure that your instance is running properly before making changes to connect it to a remotely running OrientDB instance.
Configuring OrientDB to run in server mode is fairly easy. The configuration consists of just a few steps.
- Installation of OrientDB: You must first download and extract the appropriate version of OrientDB. It is important that you match the version of OrientDB you download with the version that is embedded with the OpenEMPI version you are using. Newer versions of OrientDB may include changes in the APIs and data model that may not be compliant with OpenEMPI's use of OrientDB. If you are not sure of the version of OrientDB used with your version of OpenEMPI, you can contact us at support@sysnetint.com and we can help you.
Â
$ tar xf orientdb-community-2.2.17.tar.gz
- Configure Database: In this step you need to tell the server about the instance of the entity database that it should host. In embedded mode the database is created in the directory that is configured as the data-directory in the mpi-config.xml file. You just need an entry to the configuration file config/orientdb-server-config.xml in the storages section:
Â
<storages> <storage loaded-at-startup="true" userPassword="admin" userName="admin" path="plocal:/sysnet/person-db" name="person-db"/> </storages>
- Point OpenEMPI to the server: To tell OpenEMPI that it should connect to the OrientDB server remotely instead of running an embedded instance, you need to modify the jdbc.properties file in the conf directory under the OPENEMPI_HOME directory. You must uncomment the remote storage mode instead and comment out the plocal storage mode. If the server is running on a remote host or at a port other than the default, you may also need to change the orientdb.server and orientdb.port parameters as well, respectively.
Â
# StorageMode should be either plocal or remote orientdb.storageMode=remote #orientdb.storageMode=plocal orientdb.minPoolConnections=20 orientdb.maxPoolConnections=300 orientdb.server=localhost orientdb.port=2424 orientdb.serverUsername=root orientdb.serverPassword=password orientdb.internalServer=false Â
The serverPassword should be set to whatever password you type in the first time you start the OrientDB server using the script described below. If you are using the commercial edition of OpenEMPI make sure that you set the orientdb.internalServer option to false when running OrientDB in remote server mode.
Â
You should now be able to start the servers. You start the OrientDB server by running the server.sh script in the bin directory and then start the OpenEMPI server as usual.
Â
Â
Â