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.

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.

  1. Copy routeserver.ear.zip to the application deployment directory:
    cp routeserver.ear.zip $WLS_HOME/applications/
    
  2. Unzip routeserver.ear.zip:
    cd $WLS_HOME/applications/
    unzip routeserver.ear.zip

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 to httpclient or None. (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 and geocoder_http_proxy_port. If no proxy exists, these two parameters can be ignored

  • If necessary, change the logfile_name parameter value. By default, the logfile_name parameter is set to log/RouteServer.log. This default relative path includes a subdirectory named log, relative to where the routing engine is installed. The logfile_name parameter can also be set to an absolute path, for example: /scratch/logs/RouteServer.log.

  • If start_time and start_date are used in route requests, include the attributes date_format, time_format, and output_time_format. date_format and time_format must be ormats supported by SimpleDateFormat of Java. For example, date_format can be set to dd-MMM-yyyy and time_format can be set to HH:mm. The start_time in the route request will be parsed according to the format set by these parameters.

  • If return_route_time or return_subroute_time is used in route requests, set output_time_format to a time format supported by SimpleDateFormat in Java. The start and end times in the router response are formatted according to the output_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, the AvgNodesPartition 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.

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.