splserver()

Description:

Start or stop an SPL process on the current machine.

Syntax:

splserver(port,cfg)

Note:

The function starts or stops the SPL process on the current machine. Parameter port is port number, which cannot be omitted. Parameter cfg is the XML configuration file. When cfg is present, the function starts SPL process; when it is absent, the function stops the process. Below is content of the XML configuration file:

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

<SERVER>

// esProc root directory

<SplHome>D:/raqsoft </SplHome>

<JVMArgs>-Xms128m -Xmx1024m</JVMArgs>

// temp file timeout (hour)

<TempTimeOut>12</TempTimeOut>

// Check timeout interval (second)

<Interval>0</Interval>

// Proxy timeout (hour)

<ProxyTimeOut>12</ProxyTimeOut>

// Log file path

<LogPath>D:/raqsoft/esProc/log/splserverlog</LogPath>

// Path of esProc configuration file raqsoftConfig.xml

  <SplConfig>D:/raqsoft/esProc/config/raqsoftConfig.xml</SplConfig>

</SERVER>

Name and path of the configuration file can be user-defined; just make sure that the reference in parameter cfg is the same

Parameter:

port

The port number.

cfg

XML configuration file name; stop the process at the specified port when it is absent.

Return value:

Boolean value

Example:

Below is content of test.splx:

 

A

B

1

=connect("demo").query("select * from SCORES  where SUBJECT=?",arg1)

 

2

return A1

return A1.(SCORE)

 

 

 

A

 

1

=splserver(8281,"D:/SplServer.xml")

Start the process at port number 8281 on the current machine.

2

=callx("test.splx",["English","Math","PE"];["127.0.0.1:8281"])

Allocate task to node 127.0.0.1:8281 to execute the spl script.

3

=splserver(8281)

Stop the process at port number 8281 on the current machine.