> From: Yantisa Akhadi [mailto:yant...@gmail.com] 
> Sent: Monday, July 15, 2013 12:59 AM
> Subject: Re: [HOT] next HOT tech chat
> 
> A very interesting topic, unfortunately 17.00 UTC equal 02.00 AM in 
> Indonesia. Here in Indonesia we're thinking of developing some kind 
> of cache server, since network bandwith is a major issue almost in 
> every workshop that we have.

So, there's a few different things you could cache.

One is imagery/tiles. For tiles it's a well-solved problem, tile.osm.org
uses a bunch of squid caches and the configuration is all at
http://git.osm.org/chef.git/tree/HEAD:/cookbooks/tilecache

Imagery is in principle the same, but you have to check the terms of use to
make sure you can cache.

In terms of bandwidth, tiles + imagery is probably most. The two remaining
are API downloads and API uploads.

For download, there's a few options. If you're using JOSM with the mirrored
download plugin you can download from an XAPI-style mirror. This only works
on map? calls (downloading an area), not the other API calls like download
relation members. It also requires a plugin and an xapi-style mirror, which
I'll get to later.

There's almost-api which is a simple PHP script that directs to either an
overpass API instance or the main API, as appropriate. It doesn't support
oauth and some calls aren't properly supported.

I'm working on a cgimap-based solution right now, which uses pgsnapshot as a
backend. Better call support, and I have a config that redirects to the main
API for calls it can't handle.

All three problems require an xapi/pgsnapshot/overpass instance. This is
roughly in the 500GB range. You could load an extract and use regional
diffs, but I think these often lag behind by a few minutes+, and conflict
resolution is a pain.

As for API uploads, they can't be cached. 

For a deployment with limited resources, the only options are probably tiles
+ imagery caches. Hopefully if you can take away a significant part of the
traffic it makes everything else better. 

For the Indonesia case, an API cache is an option, but I'd suggest the
priority should be a tile CDN cache meeting the specs at
http://wiki.openstreetmap.org/wiki/Servers/Tile_CDN. If someone wants to
supply one, the contact info and requirements are on the wiki page. I know
the admins have said a few times that they want a tile cache in Asia


_______________________________________________
HOT mailing list
HOT@openstreetmap.org
http://lists.openstreetmap.org/listinfo/hot

Reply via email to