Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Simplify HTTP resource requesting #4844

Closed
kkaefer opened this issue Apr 26, 2016 · 5 comments
Closed

Simplify HTTP resource requesting #4844

kkaefer opened this issue Apr 26, 2016 · 5 comments
Labels

Comments

@kkaefer
Copy link
Member

kkaefer commented Apr 26, 2016

Currently, the requests we issue to obtain data via HTTP first get an (optional) response served from the cache, no matter whether the data in the cache was expired. They also (optionally) get a second response with data that is always fresh. Instead of having two responses per request, we should always exactly return one response and change the behavior so that the first request is always served from cache (if possible). When the client got a stale resource, it should make a second request with appropriate headers that force a non-stale response.

@jfirebaugh
Copy link
Contributor

I don't think I understand the change you're proposing, or what part of HTTP requesting it would simplify. Can you explain again?

@kkaefer
Copy link
Member Author

kkaefer commented May 10, 2016

We're currently outsourcing the retry logic into the HTTP source. However, for #123 to work, we need to make the decision of whether to attempt to verify data freshness directly inside the renderer. I'm envisioning this order of attempting to load resources:

a

This would mean that we'll need closer control over the order these requests happen in.

@kkaefer
Copy link
Member Author

kkaefer commented May 10, 2016

In particular, cache lookups and HTTP requests need to be decoupled so that we can first do a cache lookup, and once the tile becomes an ideal tile (through zooming), we'll want to go the second step and ensure freshness.

@kkaefer
Copy link
Member Author

kkaefer commented May 13, 2016

Blocked by #5023

@jfirebaugh
Copy link
Contributor

#5027 implemented what we needed for #5143.

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

No branches or pull requests

2 participants