Thanks for this explanation.

I'm not sure to understand why you don't support last-modified.

I understand that ETag allows to handle new tile with same content.
But it is more complex as it need to store metadata for the tile.

With last-modified solution, we simply have to send the timestamp of
the file (a metadata already stored by any filesystem). Of course, we
don't avoid new file with same content, but I expect we can avoid some
downloads in many case.


Is it possible to imagine both system:
- last-modified for simple client
- Etag for evolved client


2010/2/17 Jon Burgess <jburgess...@googlemail.com>:
> On Wed, 2010-02-17 at 21:43 +0100, Jocelyn Jaubert wrote:
>> Hi Guilhem,
>>
>> Le 16 février 2010, Guilhem Bonnefille a écrit :
>> > 2010/2/7 Greg Troxel <g...@ir.bbn.com>:
>> > >  I don't see how to set the new 'tiles fresh enough' paramater.  It
>> > >  seems OSM mapnik updates from minutely tiles; it's cool to grab
>> > > them when you want, but a lot of server load normally.  I suggest a
>> > > week for the default fresh-enough-not-to-ask time, but I don't see
>> > > how to set that in the GUI and I don't see it in the viking file.
>> >
>> > I added a preference for setting this value dynamically. Check Git
>> > repo at SourceForge.
>> >
>> > But I fear that this feature is no more functional: I did many tests
>> > and I feel tiles are always downloaded (from tile.openstreetmap.org).
>> > Jocelyn, as you are the author of this feature, can you give it a try?
>>
>> I have looked at what is sent to the server, and received from it (via
>> the -V switch) and it seems that tile.openstreetmap.org returns a tile
>> even if it was not updated on the server.
>>
>> But if you try on the OSM server, then it works correctly: no tile is
>> sent by the server if viking already has a recent tile.
>
> Do you mean that the osmarender server works as you expect here?
>
>
> I wrote the mod_tile code which serves the tiles from
> tile.openstreetmap.org and can give you some background on the current
> behaviour. We made a decision to make use of the ETag header instead of
> the last-modified field. Tiles often get re-rendered without the
> contents changing. If we used the last-modified time then this would
> result in the tile being downloaded unnecessarily.
>
> Instead, we return an ETag header in the HTTP response for each tile
> which is derived from the md5sum of the tile. If the tile gets
> re-rendered and the content is identical to the previous tile then the
> ETag should match even if the last-modified-time was updated.
>
>
> When the client makes a request it should store the ETag returned. When
> it comes to request the tile again the client includes this ETag in a
> If-None-Match header. If the current tile on the server still has the
> same content then this will trigger a 304/NotModified response. I have
> included an example of in an attachment.
>
> We also return "Expires:" and "Cache-Control:" headers which can assist
> the client in deciding when to try requesting the tile again.
>
> All these headers are defined in the various HTTP RFCs. In theory,
> properly written web browsers and caches should work fine with them but
> I am beginning to wonder whether I should discard the ETag and move back
> to a simple last-modified time system.
>
>        Jon
>
>
> ------------------------------------------------------------------------------
> Download Intel&reg; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Viking-devel mailing list
> Viking-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/viking-devel
> Viking home page: http://viking.sf.net/
>



-- 
Guilhem BONNEFILLE
-=- JID: gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com
-=- mailto:guilhem.bonnefi...@gmail.com
-=- http://nathguil.free.fr/

------------------------------------------------------------------------------
Download Intel&reg; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Viking-devel mailing list
Viking-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viking-devel
Viking home page: http://viking.sf.net/

Reply via email to