tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.11k stars 527 forks source link

Ability to cancel datasource downloads #194

Closed springmeyer closed 12 years ago

springmeyer commented 13 years ago

Would be nice to be able to cancel a download that seems unresponsive (likely as its big). Currently the UI becomes unclickable/non-interactive (in Safari at least).

yhahn commented 13 years ago

I've noticed this as well... this is going to be quite the challenge though for events that trigger datasource localization that aren't UI actions (e.g. a tile request).

How would we really handle this over Restful HTTP? e.g.

  1. You make an HTTP request for a tile at 1.0.0/foobar/0/0/0.png
  2. Oops, the foobar map references some huge datasources... 0.png is going to take a while... hm...
  3. Do you make a call to 1.0.0/foobar/abort ?
  4. Do we need some kind of centralized localization process cache server side to kill localization processes?
  5. ^ All of this seems like the wrong approach ... what are other angles on this problem?
yhahn commented 13 years ago

FYI don't say socket.io : P

yhahn commented 13 years ago

One approach I'd like to try out (not immediately, maybe in an experimental branch) is to split the Tilemill server into two - UI and Tile - and have the Tile server be a child process. This would give us the ability to kill the Tile server from the UI server and respawn it. This might be a useful approach given that a user can get herself into serious trouble loading huge shapefiles, etc.

springmeyer commented 13 years ago

having the Tile server is a fully different process makes sense overall too - to avoid lock ups in the UI, and so that if the user moves away from the map that is rendering very slowly, we could then kill those renders so another map load would not be waiting for space in the rendering thread pool to open up.

yhahn commented 13 years ago

Moving out of milestone -- this will be a rather invasive change if/when we get to it.