OpenLayers OpenLayers

Ticket #803 (closed feature: fixed)

Opened 1 year ago

Last modified 11 months ago

MapServer Multi-URLs: Deterministic or Random?

Reported by: euzuro Assigned to: crschmidt
Priority: minor Milestone: 2.6 Release
Component: Layer.MapServer Version: 2.4
Keywords: Cc:
State: Complete

Description

In going through the MapServer layer and I notice this:

        // if url is not a string, it should be an array of strings, 
        //  in which case we will randomly select one of them in order
        //  to evenly distribute requests to different urls.
        if (typeof url == "object") {
            url = url[Math.floor(Math.random()*url.length)];
        }   

whereas in HTTPRequest, it is:

        // if url is not a string, it should be an array of strings, 
        // in which case we will deterministically select one of them in 
        // order to evenly distribute requests to different urls.
        //
        if (url instanceof Array) {
            url = this.selectUrl(paramsString, url);
        }  

I dont know anything about the MapServer layer, but it seems to me that we could maybe be doing the same (deterministic) thing for mapserver layer as we are for wms.

Attachments

mapserver_deterministic_url.patch (3.8 kB) - added by crschmidt on 12/21/07 00:27:06.

Change History

07/05/07 14:24:57 changed by euzuro

Im happy to make a patch for this if anyone is interested.

10/10/07 00:48:23 changed by crschmidt

  • milestone set to 2.6 Release.

If you patch this, I'll review it.

12/21/07 00:27:06 changed by crschmidt

  • attachment mapserver_deterministic_url.patch added.

12/21/07 00:27:57 changed by crschmidt

  • state set to Review.

Reorganized to match the HTTPRequest base class. Includes tests.

12/26/07 14:34:44 changed by tschaub

  • state changed from Review to Commit.

Confirmed that mapserver tests pass in FF. Patch looks good. Please commit.

01/02/08 10:23:45 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [5622]) Make MapServer multi-url selection deterministic. (Closes #803)