Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

adding retry for tile requests #57

Open
isiyu opened this issue Mar 14, 2017 · 5 comments
Open

adding retry for tile requests #57

isiyu opened this issue Mar 14, 2017 · 5 comments

Comments

@isiyu
Copy link
Contributor

isiyu commented Mar 14, 2017

related to reporting errors
#55

can we also add a retry option to the parameters input to tile objects here? loading map tiles sometimes I've noticed one or two tiles time out and not load before. Would be helpful to have a retry option here. cc @BergWerkGIS @brnkhy

@brnkhy
Copy link
Collaborator

brnkhy commented Mar 14, 2017

a quick idea would be;

var parameters = new Mapbox.Map.Tile.Parameters
            {
                Fs = this.FileSource,
                Id = new Mapbox.Map.CanonicalTileId(tile.Zoom, (int)tile.TileCoordinate.x, (int)tile.TileCoordinate.y),
                MapId = _mapId,
                RetryCount = 5 //optinal parameter, defaul can be something like 3?
            };

            var vectorTile = new Mapbox.Map.VectorTile();
            vectorTile.Initialize(parameters, () =>
...

@david-rhodes
Copy link
Contributor

@isiyu is a retry count the proper solution? It seems to me that throwing errors and letting developers handle with their own solution is best (usually this will result in a retry). In most cases, I've seen tiles fail to load because of a rate request exceeded error. A blanket retry could lead to inefficient (and unnecessary) requests that might lead to additional errors. #55

@brnkhy
Copy link
Collaborator

brnkhy commented Mar 14, 2017

@david-rhodes

In most cases, I've seen tiles fail to load because of a rate request exceeded error.

I think you're right. I can't remember any other type of fetching errors given the correct url.
But we can also also trying dropping&re-requesting if it takes too long.
It's just annoying when there's 1-2 tiles missing in there and there's nothing you can do about it. Guess we can handle that in unity side and keep checking and requesting missing tiles in view (slippy view or defined area).

@isiyu
Copy link
Contributor Author

isiyu commented Mar 14, 2017

sounds like there's some conversations happening around retries here: https://github.com/mapbox/api/issues/30

Overall I think we can retry certain types of failures (mainly timeouts), things like rate limits or 4XX errors we would not retry. This would be focused on the 1-2 missing tiles issue.

The other issue that we're masking here is I'm not sure how we're handling timeouts on the unity-sdk (between the unity sdk and the cs sdk) side.

@david-rhodes
Copy link
Contributor

I don't think we are handling timeouts at all. Good candidate to add as a feature when we overhaul the FileSource in Unity SDK.

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

No branches or pull requests

3 participants