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

Tile expiration #99

Closed
pjcozzi opened this issue Jul 6, 2016 · 13 comments
Closed

Tile expiration #99

pjcozzi opened this issue Jul 6, 2016 · 13 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 6, 2016

To support some types of dynamic tilesets that may change on the server, consider adding a per-time expiration time stamp (explicit date/time) or duration (in seconds), which indicate when a tile and its sub-tree become invalid and should be re-requested.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 14, 2016

@lilleyse what do you think about this new per-tile expire object property?

Use expire.date:

{
  "expire": {
    "date" : "2012-04-30T12:02Z" // Julian date like CZML, https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Structure
  },
  "boundingVolume": {
    // ...
  },
  "geometricError": 43.88464075650763,
  "refine" : "add",
  "content": {
    "boundingVolume": {
      // ...
    },
    "url": "2/0/0.b3dm"
  },
  "children": [...]
}

Or use expire.duration:

{
  "expire": {
    "duration" : 30 // seconds  from when the tile is downloaded (not requested, not first rendered, not generated, etc.)
  },
  "boundingVolume": {
    // ...
  },
  "geometricError": 43.88464075650763,
  "refine" : "add",
  "content": {
    "boundingVolume": {
      // ...
    },
    "url": "2/0/0.b3dm"
  },
  "children": [...]
}

expire can have either a date sub-property or a duration sub-property (if both are provided, the soonest one is used). The runtime can convert it to an expiration date, and then request a new tile (and eventually sub-tree) when it expires. The runtime can still show the expired tile while it waits for the new tile request. If the request doesn't come back, e.g., because that tile is no longer part of the tileset, then the expired tile should be unloaded (and, of course, unloaded when the request is successful).

For future work for the Cesium implementation, we could also proactively unload expired tiles in our cache that are not visible, but I'll make this a roadmap item.

From the server's perspective, date allows the use case for a static file server to serve a tileset with a know expiration date; where as duration allows a dynamic server to generate a tile that is valid for a particular amount of time.

@lilleyse
Copy link
Contributor

lilleyse commented Jul 14, 2016

Just so I'm clear, does expire mean refreshing the whole subtree, or just the content of a single tile? Is this a property worth adding to the expire block?

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 14, 2016

I would expire the tile and its sub-tree. I don't have a use case for expiring just the tile, but it can be added in a backwards-compatible way if good use cases arise.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 18, 2016

For the spec:

  • Just the content.url is requested again (it may, of course, point to an external tileset). The newly downloaded tile/tileset may still have spatial coherence with its parent.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 19, 2016

For the spec:

  • Time expiration should be in the tile (header / feature json) so it can change from request to request.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 20, 2016

Cesium implementation: CesiumGS/cesium#4136

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 20, 2016

For the spec:

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jul 23, 2016

Video: https://youtu.be/JlPLRtFzn5g

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jan 10, 2017

@lilleyse is it reasonable for you to do this spec work? Is the implementation solid enough? Would this be pretty quick? I have lots of notes for the spec throughout this issue.

@lilleyse
Copy link
Contributor

The implementation isn't super solid, I want to rethink the approach. I can write the spec for this.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Jan 10, 2017

Let's hold for now, and updated the spec and implementation at the same time.

@pjcozzi
Copy link
Contributor Author

pjcozzi commented Apr 6, 2018

Pull request: #217

Nonetheless, let's push post 1.0 for scope.

@pjcozzi pjcozzi removed the 1.0 label Apr 6, 2018
@lilleyse
Copy link
Contributor

lilleyse commented Nov 15, 2021

Tile expiration be could stored in metadata as a semantic, and the application can re-request content at runtime.

Unlikely to make it into the core spec.

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

No branches or pull requests

2 participants