Download Queue

From World Wind Wiki

Revision as of 22:34, 27 June 2005 by (Talk)
Jump to: navigation, search

World Wind has had no common download queue. Quad tile sets have had one queue each, terrain tiles had no queue at all and was blocking the update thread.


Class diagram



DownloadQueue is globally accessible and keeps track of active downloads and queued items. It doesn't run on it's own thread but starts downloads on the thread calling the Add/Remove methods, and also on the callback from WebDownload when a download has been completed.

When initiating a download the DownloadQueue will loop through all requests and find the one with the highest score and download that. Downloads with score = float.MinValue will be removed.

In GeoSpatialDownloadRequest (bottom) the score equals the relative amount of screen area (pixels) the tile occupies. This prioritizes tiles that will have a big visual impact.

It would probably be nice to have other factors influcence the decisions too, like perhaps how many downloads are currently in progress from a certain server?

Personal tools