[OpenLayers-Trac] [OpenLayers] #410: multi-wms servers should use deterministic server id

OpenLayers trac at openlayers.org
Wed Mar 21 13:00:10 EDT 2007


#410: multi-wms servers should use deterministic server id
------------------------+---------------------------------------------------
  Reporter:  crschmidt  |       Owner:  sderle     
      Type:  bug        |      Status:  reopened   
  Priority:  minor      |   Milestone:  2.4 Release
 Component:  Layer      |     Version:  SVN        
Resolution:             |    Keywords:  commit     
------------------------+---------------------------------------------------
Comment (by euzuro):

 I would like to note that before this ticket should be closed as 'fixed'
 again, it would sure be nice if someone could take the three minutes
 necessary to put some comments in the seletctUrl function.

 I do not consider myself the wisest of the wise, yet neither am i the most
 novice programmer or OL user, and I can tell you that I had *no* idea what
 is going on in this function at first glance. I had to do an svn blame to
 see when it was added, then read up on the ticket for more info.

 I see this comment, inline lower in the code, where the function gets
 called:

 {{{
     // in which case we will deterministically select one of them in
     // order to evenly distribute requests to different urls.
 }}}

 This is nice but we should see that explanation (namely, the
 'deterministically' bit) up in the function comment as well.

 To me, any time you are doing wierd math like:
 {{{
 (Math.sqrt(5) - 1) / Math.sqrt(3)
 }}}
 ... you should probably have at least a loose explanation of what is going
 on there.

 (note that this value, by the way, should be replaced by a constant so
 that it's not getting re-computed for each character in the paramstring
 ((and so that the line doesnt go over the 79 character limit)) )

-- 
Ticket URL: <http://trac.openlayers.org/ticket/410#comment:13>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list