-
Notifications
You must be signed in to change notification settings - Fork 240
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
DataSource refactoring #1014
DataSource refactoring #1014
Conversation
std::unique_ptr<RawDataSource> next; | ||
}; | ||
|
||
class NetworkDataSource : public RawDataSource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need another class for non tiled network data sources. As an MBTile source could be downloaded, or in future our own mapzen "zipped" source could be downloaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downloading bundles should be handled separately in my opinion, similar to what we do in ClientGeoJson source, or become part of scene loading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downloads of huge MBTiles packs needs some more thought. Bundles should be stored on disk to not download a few hundred MB each time. Also better ask for user feedback before downloading when they are on mobile data ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that run-time download of new tile bundles is something that should be handled by a Mapzen platform SDK (Android or iOS) rather than in Tangram core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree download of the bundles should be handled by the platform SDK.
I was mainly asking about about where does it fit in this new rawdata chaining architecture.
ce1d7d3
to
22732dd
Compare
7e5e6d6
to
0150cc8
Compare
efe58d5
to
f0925aa
Compare
f0925aa
to
d55f9a1
Compare
d55f9a1
to
90f59d5
Compare
90f59d5
to
5e50690
Compare
5e50690
to
7653707
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'm good with merging this.
- use chain of RawDataSource to make it easier extendable (e.g. for file-cache or MBTiles)
0bfdcac
to
0302990
Compare
This PR adds the RawDataSource interface to enable chaining of tile data fetching.
A DataSource holds a chain of RawDataSources. On a tile request
loadTileData
is called on the first RawDataSource, if it can't serve the tile data the request is passed on to the next source. The task is passed back through the chain via theTileTaskCb
. This allows earlier sources to intercept the result e.g. for caching by passing their ownTileTaskCb
.The in-memory cache and tile download steps are moved out of DataSource and now implemented as RawDataSources.