Deploying DQL Server

Read(1342) Label: dql server, deploy,

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 directions:

 

1.  Load necessary jar files

Put the following jar files in a loadable directory at the startup of the DQL server. The path is [esProc installation root directory]/esProc/lib:

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

 

 

2.  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 logical database’s metadata file (*.glmd).  It is located in service directory [installation directory]/ esProc/esproc-services/.

2) The metadata file is generated by metadata design editor and stored in conf directory, under which there is also the dictionary file (*.gdct). The sample data files used by the metadata file 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.

l  

Note:

Multiple DQL Server service instances are allowed within one process. Names of configuration files server.xml and service.xml must not be changed.

3.  server.xml

Deploy server.xml in the [application root directory]/esProc/ esproc-services. Its contents are as follows:

 

<?xml version="1.0" encoding="UTF-8"?>

 

<SERVER host="127.0.0.1" port="3368" timeout="3000" log="true" raqsoftConfig="config\raqsoftConfig.xml" autoStart="false">

 

<SERVICE name="datalogic"/>

</SERVER>

 

  These are properties of <SERVER/> tag:

  host: DQL Server’s host IP address.

  port: DQL Server’s listener port number, which is 3368 by default.

  timeout: DQL Server longest client-side wait time, which is 3000 (unit:millisecond) by default. Wait again after timeout. This parameter affects the response time of closing DQL Server. The longer the client-side wait time, the less waste in CPU performance and the longer of response time for closing the server.

  log: Specifies whether or not record the execution log. The default value is true. Log is stored in dql.txt_********.log under [installation directory]/esProc/log/.

  raqsoftConfig: Path of configuration file raqsoftConfig.xml for reading the main path and the other information.

  autoStart: Specifies whether or not automatically start DQL service. Default is false.

  <SERVICE/>: The list of to be started DQL Servers. Multiple servers can be configured under multiple <service/> nodes, where the service specified in each’s name property must be located in [application root directory]\ esproc-services. There may be multiple DQL Server service directories under esproc-services, but only the services listed under <service/> will be started.

  name: DQL Server name, which must be the same as the corresponding folder in service directory.

 

Note: The nodes and properties highlighted in blue must be configured.

4.  service.xml

Deploy service.xml in [application root directory]/esProc/esproc-services/services directory. Its contents are as follows:

 

<SERVICE logicmetadata="demo.glmd">

 

<USERS>

<USER name="sa" password="sa"/>

<USER name="ww" password="ww"/>

<USER name="ee" password="ee"/>

</USERS>

</SERVICE>

Properties of <SERVER/> tag:

Logicmetadata: Metadata file [.glmd] stored in [application root directory]\ esproc-services\service directory\conf.

<USERS/> : DQL server user privilege settings. Configure multiple users under multiple <USER/> nodes.

<USER/> : DQL Server user connection information.

name: User name, which is optional.

Password: User password, which is optional.

 

Note: 1) The nodes and properties highlighted in blue must be configured.

2) If the xml file involves special characters, they need to be first escaped before being written to the file. For example, "&" needs to be written as "&amp;".

5. Starting DQL Server

To start DQL Server, the execution command should contain the following parameters:

javaw -Djava.ext.dirs=<JAR load path> -Dstart.home=<main path> com.esproc.dql.server.ServerConsole

Ø  -Djava.ext.dirs: Specify the path for loading Java extension JAR files (replace <JAR load path> with the actual directory.

Ø  -Dstart.home: Specify DQL Server’s main directory (replace <main path> with the actual path).

Ø  Startup class: com.esproc.dql.server.ServerConsole

Note: There must be the services subdirectory in the main directory specified in start.home.

A command example:

javaw -Djava.ext.dirs="D:\raqsoft\esProc\lib" -Dstart.home="D:\raqsoft\esProc" com.esproc.dql.server.ServerConsole

Execute the command and DQL Server window pops up. In the window click Start button to start the DQL service:

For your convenience, you can save the execution command as a startup file, such as the startDQLSERVER.bat in Windows [installation root directory]/esProc/bin.

Under Linux, you can use the non-GUI console to execute the command. Under esProc’s [installation root directory]/esProc/bin, execute ./startDQLSERVER.sh  -d to start DQL Server service, and execute ./startDQLSERVER.sh  -x to close the 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: 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