After esProc is installed, the application contains a set of metadata files in the format of composite tables (.ctx) and related DQL Server service. Users can deploy the DQL Server service within the esProc application or deploy their independent DQL Server.
Below are detailed explanations about the deployment and configurations of DQL Server.
To deploy DQL Server, follow these instructions:
1. Startup file
You can start DQL Server directly through startDQLSERVER.bat/dqlserver.exe, which is located in Windows [installation directory]/esProc/bin.
As the following screenshot shows:
You can choose to use the non-GUI console under Linux. Execute command ./startDQLSERVER.sh -d in [esProc installation directory]\esProc\bin to start DQL Server service, and command ./startDQLSERVER.sh -x to close the service.
2. Load necessary jars
Put jars DQL Server needs in a directory that can be loaded at the startup of DQL Server. The jars include:
esproc-bin-***.jar DQL Server computing engine and JDBC driver jar file
esproc-ext-***.jar DQL Server computing engine and JDBC driver jar file
esproc-ent-***.jar DQL Server computing engine and JDBC driver jar file
json-20240303.jar For parsing JSON strings
lz4-1.3.0.jar For compressing ctx files
These jar files can be obtained in [installation directory]/esProc/lib directory.
3. Deploying esproc-services directory
The esproc-services directory is DQL Server’s main directory, which contains multiple logical databases. Each logical database uses an independent directory, as the datalogic directory in the above screenshot shows. server.xml is for adding a DQL Server logical database the application will use. Below shows a logical database directory:
1) service.xml is used to configure the metadata file (*.glmd) for DQL Server. The metadata file should be deployed under DQL Server’s【esproc-services à services directory àconf】directory. There are also dictionary file (*.gdct) and lexicon file (*.glxc) under conf directory. The sample data files the metadata file uses are compressed in pseudo.zip under esProc installation directory\esProc\documents\en. The pseudo folder needs to be decompressed and placed under the main directory for use.
2) service.xml is, by default, located in the [installation directory]/ esProc/esproc-services/services directory. The metadata file is generated through Metadata Editor.
Note:
Multiple DQL Service services are allowed within one process. Names of configuration files server.xml and service.xml must not be changed.
4. server.xml
Deploy server.xml in the [application root directory]/esProc/ esproc-services. Its contents are as follows:
server.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Put server.xml in [application root directory]\esproc-services -->
<!-- host: IP address of DQL Server’s host computer -->
<!-- port: DQL Server’s listening port number -->
<!-- timeout: DQL Server’s longest wait time for response at the client-side; another round of wait begins at time-out. The parameter determines the response time of closing DQL Server; the larger the timeout value (unit: millisecond), the less CPU performance is wasted and the longest the wait time for closing the Server-->
<!-- log: Decide whether or not record the Run logs. Logs are put in [installation directory]/esProc/log/ with the name dql.txt_********.log -->
<!--raqsoftConfig: Path of configuration file raqsoftConfig.xml for reading information like the main path -->
<!--autoStart: Automatically start DQL service or not-->
<SERVER host="192.168.1.8" port="3366" timeout="30000" log="true" raqsoftConfig="config\raqsoftConfig.xml" autoStart="false">
<!-- SERVICE: The list of to-be-started DQL Server services, which can be multiple; add multiple <service/> when there are multiple services, and the service specified by each <service/>’s name property should be located in [application root directory]\esproc-services. There can be multiple DQL Server service directories under the esproc-services directory, but only the listed ones will be started -->
<!-- name: DQL Server’s name, which should be the same as that of the corresponding directory -->
<SERVICE name="datalogic"/>
</SERVER>
5. service.xml
Deploy service.xml in [application root directory]/esProc/esproc-services/services directory. Its contents are as follows:
service.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Storage path where the metadata file under services is saved:
The metadata file [logicmetadata] is placed in [application root directory]\esproc-services\services directory\conf
-->
<!-- logicalmetadata: DQL Server’s metadata file -->
<SERVICE logicmetadata="demo.glmd">
<!-- USERS: User privilege configurations for DQL Server -->
<!--name: User name; there can be multiple users-->
<!--password: User password -->
<USERS>
<USER name="sa" password="sa"/>
<USER name="ww" password="ww"/>
<USER name="ee" password="ee"/>
</USERS>
</SERVICE>
6. Connecting to DQL Server
Connect to DQL Server through JDBC after it is successfully started.
Connect to DQL Server according to the following directions:
JDBC:
Reference DQL Server JDBC’s driver jars (esproc-bin-***.jar, esproc-ext-***.jar and esproc-ent-***.jar) in the application when connecting DQL Server via JDBC.
Driver — com.esproc.dql.jdbc.DQLDriver
URL—jdbc: jdbc:esproc:dql://[host]:[port],[host]:[port],.../[serviceName]?[&user={userName}]&[password={password}]
// Parameter:
[host]:[port] -> DQL Server’s IP address and port number; there can be multiple sets of them but make sure that except for the IP and port, other contents should maintain the same. Connect to the directly next one when the current service cannot be connected until the Server is connected successfully.
[serviceName] -> Name of the to-be-connected DQL Server
[userName]/[password] -> User name and password of DQL Server service