14.2 Deploying the Routing Engine
This topic provides an overview of deploying the routing engine.
Before following steps in this topic, be sure you understand the information in Deploying and Configuring Spatial Web Services and performed any necessary operations.
Deploying the routing engine involves the following actions.
- Unpacking the routeserver.ear File
- Editing the web.xml File for Routing Engine Deployment
- Deploying the Routing Engine on WebLogic Server
Parent topic: Routing Engine
14.2.1 Unpacking the routeserver.ear File
To unpack the routeserver.ear.zip file, follow these steps.
In examples in these steps, the following values are used:
-
The WebLogic Server Home ($WLS_HOME) is
/scratch/software/Oracle/Middleware/user_projects/domains/spatial/
. -
The application deployment directory is
$WLS_HOME/applications/
.
However, use the values appropriate for your environment if they are different.
Parent topic: Deploying the Routing Engine
14.2.2 Editing the web.xml File for Routing Engine Deployment
This section describes changes to parameter values in the web.xml
file that you must make for the routing engine to deploy properly. (There are also other parameters that you can change to alter how the routing engine operates.)
-
Change the
container_ds
parameter to be the JNDI Name of the data source associated with the managed server. For example:JNDI/NorthAmericanDS
-
Change the
routeserver_network_name
parameter to the name of the Network Data Model (NDM) network built on the routing engine road network data. For example:NorthAmericanNetwork
-
If the WLS Managed Server has a Work Manager associated with it, change the
wl-dispatch-policy
parameter value to the name of the Work Manager. For example:NorthAmericanWM
-
Check to be sure the
geocoder_type
parameter is set tohttpclient
orNone
. (thinclient
is no longer supported.)-
If set to httpclient, then also set
geocoder_http_url
to the URL of the Geocoder servlet. For example:http://localhost:8888/geocoder/gcserver
-
If an HTTP proxy is being used, then also specify
geocoder_http_proxy_host
andgeocoder_http_proxy_port
. If no proxy exists, these two parameters can be ignored
-
-
If necessary, change the
logfile_name
parameter value. By default, thelogfile_name
parameter is set tolog/RouteServer.log
. This default relative path includes a subdirectory namedlog
, relative to where the routing engine is installed. Thelogfile_name
parameter can also be set to an absolute path, for example:/scratch/logs/RouteServer.log
. -
If
start_time
andstart_date
are used in route requests, include the attributesdate_format
,time_format
, andoutput_time_format
.date_format
andtime_format
must be ormats supported bySimpleDateFormat
of Java. For example,date_format
can be set todd-MMM-yyyy
andtime_format
can be set toHH:mm
. Thestart_time
in the route request will be parsed according to the format set by these parameters. -
If
return_route_time
orreturn_subroute_time
is used in route requests, setoutput_time_format
to a time format supported bySimpleDateFormat
in Java. The start and end times in the router response are formatted according to theoutput_time_format
value. -
Change the
partition_cache_size
parameter. The default value for this parameter is 70, but it will probably need to be changed depending on the amount of memory allocated to the heap on the managed server. The following formula can be used to get a good starting point for a cache size.partition_cache_size = (NodesPerGigabyte/AvgNodesPartition)*UsableMemory
Where:
-
NodesPerGigabyte
is the number of nodes per gigabyte. (This value should not change. In the data sets as of December 2013, this value is 15000000, that is, 1.5 million.) -
AvgNodesPartition
is the average number of nodes per local partition. This does not include the highway partition 0. The memory for the highway partition is accounted for in the 1 gigabyte subtracted from the allocated heap size. For the North American data set, theAvgNodesPartition
value is around 26000. You can check the actual average nodes per partition by using the following query:SELECT AVG(COUNT(node_id)) FROM node WHERE partition_id>0 GROUP BY partition_id;
-
UsableMemory
is the managed server allocated heap size in Gigabytes minus 1 Gigabyte.
This formula generates a safe number for the
partition_cache_size
parameter. Depending on the types of user information being used and the average number of concurrent requests being processed, it may be possible to add another 15% to 20% to this number. Use the WLS console to monitor the heap usage before changing this number.The heap can then be monitored while the routing engine is running to tune this number up or down. However, setting this value too high may cause the managed server to run out of memory.
-
Parent topic: Deploying the Routing Engine
14.2.3 Deploying the Routing Engine on WebLogic Server
To deploy the routing engine on WebLogic Server, follow the steps under “Deploying Spatial Web Services on WebLogic Server and Editing the web.xml File” in Deploying and Configuring Spatial Web Services.
After the routing engine is deployed, you can test the deployment with a set of routing engine test queries. For example, if the managed server was set up to run on port 7003, the routing engine servlet can be tested from http://localhost:7003/routeserver/
.
These queries can run a variety of different types of route requests. These queries contain North American addresses, but the addresses can easily be manipulated on the web page for other data sets.
Parent topic: Deploying the Routing Engine