The dynamic map engine is a virtual map engine that provides load balancing and fail over support for other map engines.
When a dynamic map engine is configured it is setup so that it points to one or more other map engines that all have the same configuration and then anything that previously pointed to the original map engine is changed to point to the new map engine, or the old map engine is renamed and the dynamic map engine is given the id of the old map engine.
Then the dynamic map engine provides fail over if one of the map engines fails or it will cycle between the map engines passing the incoming requests to each one it turn to provide load balancing.
The dynamic map engine is also useful for developers and administrators that need to test multiple map engines and don't want to have to change map engine id's in client configuration when they want to switch map engines, since a dynamic map engine can be configured with one back end map engine client and will simply act as a front for that engine, allowing the administrator to change the back end map engine id in the dynamic map engine configuration and have everything that points to the dynamic map engine now work with the new back end map engine.
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="urn:com.cohga.server.config#1.0" xmlns:wms="urn:com.cohga.server.map.wms#1.0" xmlns:dynamic="urn:com.cohga.server.map.dynamic#1.0"> <wms:mapengine id="wms1"> <url>http://server1.local/wms</url> <!-- other WMS configuration items --> </wms:mapengine> <wms:mapengine id="wms2"> <url>http://server2.local/wms</url> <!-- other WMS configuration items --> </wms:mapengine> <!-- will cycle between wms1 and wms2 for each request --> <dynamic:mapengine id="loadbalanced"> <mapengine>wms1</mapengine> <mapengine>wms2</mapengine> </dynamic:mapengine> <!-- will use wms1 until that fails then switch to wms2 --> <dynamic:mapengine id="failover"> <failover>true</failover> <mapengine>wms1</mapengine> <mapengine>wms2</mapengine> </dynamic:mapengine> </config>
In the above example any configuration item that previously references wms1
or wms2
would now reference loadbalanced
or failover
and operate the same as before with the benefits of load balancing or fail over.