Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[General] Improve Round Robin Computation for WMS Layers #2

Open
simboss opened this issue Jun 6, 2013 · 2 comments
Open

[General] Improve Round Robin Computation for WMS Layers #2

simboss opened this issue Jun 6, 2013 · 2 comments

Comments

@simboss
Copy link
Member

simboss commented Jun 6, 2013

No description provided.

@simboss
Copy link
Member Author

simboss commented Jun 6, 2013

It is currently NOT threasafe at all!

The current code from WMSLayer is shared from different concurrent callers:

/**
 * Get the WMS backend URL that should be used next according to the round robin.
 * 
 * @return the next URL
 */
protected String nextWmsURL() {
    curWmsURL = (curWmsURL + 1) % wmsUrl.length;
    return wmsUrl[curWmsURL];
}

I guess we can do something better. I would for an instance randomize the number or make it thread safe if possible without touchin scalability.

@aaime
Copy link
Member

aaime commented Jun 6, 2013

Il giorno 06/giu/2013 17:18, "Simone Giannecchini" notifications@github.com
ha scritto:

It is currently NOT threasafe at all!


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants