[Marble-devel] [RFC] How to specify download policies

Torsten Rahn tackat at t-online.de
Fri Oct 2 11:20:35 CEST 2009


I think both proposals have their merits and they don't exclude each other. So 
why not implement 1) first and then add 2) later on in addition?

Torsten


Am Donnerstag 01 Oktober 2009 18:14:02 schrieb Jens-Michael Hoffmann:
> Hi,
> 
> we want to specify download policies.
> 
> The first use case is OpenStreetMap. Here we want to specify that in
>  browsing mode we may have up to 20 open connections and in bulk
>  downloading mode (for "Download region") we must not have more than 2
>  concurrent connections.
> 
> So, how does it look like now in openstreetmap.dgml?
> 
> <layer name="openstreetmap" backend="texture" >
>     <!-- OpenStreetMap mapnik rendered tiles expire after seven days or
>  604800 seconds --> <texture name="mapnik_data" expire="604800" >
>         <sourcedir format="PNG"> earth/openstreetmap </sourcedir>
>         <storageLayout levelZeroColumns="1" levelZeroRows="1"
>  mode="OpenStreetMap" /> <projection name="Mercator" />
>         <downloadUrl protocol="http" host="a.tile.openstreetmap.org"
>  path="/" /> <downloadUrl protocol="http" host="b.tile.openstreetmap.org"
>  path="/" /> <downloadUrl protocol="http" host="c.tile.openstreetmap.org"
>  path="/" /> </texture>
> </layer>
> 
> Here we can see that for OpenStreetMap there are 3 download hosts defined
>  which get used in a round robin fashion.
> 
> For defining our above mentioned policies there are different
>  possibilities:
> 
> 1) simple and at the moment sufficient, policies apply to all specified
>  hosts
> 
> <layer name="openstreetmap" backend="texture" >
>     <!-- OpenStreetMap mapnik rendered tiles expire after seven days or
>  604800 seconds --> <texture name="mapnik_data" expire="604800" >
>         <sourcedir format="PNG"> earth/openstreetmap </sourcedir>
>         <storageLayout levelZeroColumns="1" levelZeroRows="1"
>  mode="OpenStreetMap" /> <projection name="Mercator" />
>         <downloadUrl protocol="http" host="a.tile.openstreetmap.org"
>  path="/" /> <downloadUrl protocol="http" host="b.tile.openstreetmap.org"
>  path="/" /> <downloadUrl protocol="http" host="c.tile.openstreetmap.org"
>  path="/" />
> 
> +       <downloadPolicy downloadType="Browse" maxConnections="20" />
> +       <downloadPolicy downloadType="Bulk" maxConnections="2" />
> 
>     </texture>
> </layer>
> 
> 
> 2) complicated but powerful, policies can apply to subsets of hosts, for
>  example we could say that a.tile.openstreetmap.org may have 10 connections
>  and b.tile.openstreetmap.org and c.tile.openstreetmap.org may have 10
>  connections together, etc.
> 
> <layer name="openstreetmap" backend="texture" >
>     <!-- OpenStreetMap mapnik rendered tiles expire after seven days or
>  604800 seconds --> <texture name="mapnik_data" expire="604800" >
>         <sourcedir format="PNG"> earth/openstreetmap </sourcedir>
>         <storageLayout levelZeroColumns="1" levelZeroRows="1"
>  mode="OpenStreetMap" /> <projection name="Mercator" />
>         <downloadUrl protocol="http" host="a.tile.openstreetmap.org"
>  path="/" /> <downloadUrl protocol="http" host="b.tile.openstreetmap.org"
>  path="/" /> <downloadUrl protocol="http" host="c.tile.openstreetmap.org"
>  path="/" />
> 
> +        <downloadPolicy downloadType="Browse" maxConnections="20">
> +            <host>a.tile.openstreetmap.org</host>
> +            <host>b.tile.openstreetmap.org</host>
> +            <host>c.tile.openstreetmap.org</host>
> +        </downloadPolicy>
> +        <downloadPolicy downloadType="Bulk" maxConnections="2">
> +            <host>a.tile.openstreetmap.org</host>
> +            <host>b.tile.openstreetmap.org</host>
> +            <host>c.tile.openstreetmap.org</host>
> +        </downloadPolicy>
> 
>     </texture>
> </layer>
> 
> 
> What do you think?
> I'm sure there are other possibilities as well, please don't hesitate to
>  propose alternative solutions.
> 
> 
> Best regards,
> 
> Jens-Michael
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
> 


More information about the Marble-devel mailing list