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_dsparameter to be the JNDI Name of the data source associated with the managed server. For example:JNDI/NorthAmericanDS -
Change the
routeserver_network_nameparameter 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-policyparameter value to the name of the Work Manager. For example:NorthAmericanWM -
Check to be sure the
geocoder_typeparameter is set tohttpclientorNone. (thinclientis no longer supported.)-
If set to httpclient, then also set
geocoder_http_urlto 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_hostandgeocoder_http_proxy_port. If no proxy exists, these two parameters can be ignored
-
-
If necessary, change the
logfile_nameparameter value. By default, thelogfile_nameparameter is set tolog/RouteServer.log. This default relative path includes a subdirectory namedlog, relative to where the routing engine is installed. Thelogfile_nameparameter can also be set to an absolute path, for example:/scratch/logs/RouteServer.log. -
If
start_timeandstart_dateare used in route requests, include the attributesdate_format,time_format, andoutput_time_format.date_formatandtime_formatmust be ormats supported bySimpleDateFormatof Java. For example,date_formatcan be set todd-MMM-yyyyandtime_formatcan be set toHH:mm. Thestart_timein the route request will be parsed according to the format set by these parameters. -
If
return_route_timeorreturn_subroute_timeis used in route requests, setoutput_time_formatto a time format supported bySimpleDateFormatin Java. The start and end times in the router response are formatted according to theoutput_time_formatvalue. -
Change the
partition_cache_sizeparameter. 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)*UsableMemoryWhere:
-
NodesPerGigabyteis 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.) -
AvgNodesPartitionis 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, theAvgNodesPartitionvalue 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; -
UsableMemoryis the managed server allocated heap size in Gigabytes minus 1 Gigabyte.
This formula generates a safe number for the
partition_cache_sizeparameter. 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