Overpass popup patch

Roland Olbricht roland.olbricht at gmx.de
Fri Jan 18 18:42:16 GMT 2013


> Well another question that arises once we have our own instance is
> whether to allow it to be used generally or whether to try and limit it
> to only being used to back the home page.

That is a good point. But it is rather a problem of policy than of capacity.

First of all, the current demand is almost always a lot lower than the 
capacity of the current server:

http://overpass-api.de/munin/de/overpass-api.de/index.html#other
shows the number of queries, and
http://overpass-api.de/munin/de/overpass-api.de/cpu.html
http://overpass-api.de/munin/de/overpass-api.de/vmstat.html
also have resource reserves. So even if all users would switch to the osm.org 
instance, this would not seriously affect the osm.org instance.

Even better, there are a couple of possible settings to let the server 
automatically manage traffic:

(1) Do nothing: In this case, the server gives short running queries 
precedence over long running queries. And we annouce with [timeout:3] very 
short running queries compared to the default timeout of 180 seconds. So other 
user activity might use resources but doesn't interfere with the popup usage.

(2) Lower the timeout limit setting: setting the limit to 359 would inhibit 
all queries with default timeout and still allow up to 118 queries with 3 
seconds timeout in parallel.
 
(3) Use another server as proxy: We could proxy the requests and not make the 
overpass instance public accessible. However, this adds dependencies and is 
more opaque, so this is rather a last resort.

In general, (1) suffices and we then still have (2) as reserve.

> > Thank you for the feedback. I assume from the description that a mouse
> > click anywhere on the map should open a popup, or do we want to restrict
> > it somehow further? What other event can the action be bound to?
>
> Well my point was that from reading your patch it looked like that was
> the current design (any click opens a popup) but I imagine we would want
> something more subtle than that, depending on exactly when leaflet fires
> a click event.

Thank you for the suggestion. After some testing I'm quite sure that this 
doesn't interfere with dragging the map, shift plus left mouse button, or the 
right mouse key (which seems to be unused anyway in leaflet).

What's left are double clicks. They still magnify, but open a popup in 
addition. I'm not sure whether this is a relevant for the user experience, but 
I'll look for alternative approaches.

Cheers,

Roland




More information about the rails-dev mailing list