[OSM-talk] live rendering

Frederik Ramm frederik at remote.org
Thu May 3 19:27:07 BST 2007


Hi,

> We could use triggers to assign an importance field to features. 

The more you use triggers, the more you slow down a simple update with 
tasks that are in fact the first step of a rendering process. I still 
maintain it would be a much more solid alternative to invest work in a 
way of keeping a live copy of the data, where you can run triggers to 
your heart's content without delaying changes or insertions of new data 
to the central repository.

But this is an opinion built from theory, and from having seen 
considerable harm done by triggers in the wrong hands ;-) - I cannot say 
how complicated the required operations will be, and maybe Postgres even 
has a way to execute triggers asynchronously without delaying the 
operation that fired the trigger.

 > Alternatively, we could use triggers to maintain low-zoom summary
> features in their own database tables.

I was thinking of replication one level above the database - let the API 
write a kind of "spool file" where it stuffs things in addition to 
writing them to the database. Others can then use that spool file to 
feed their own databases. Again, in my eyes triggers are unsuitable for 
handling the intensity of write access we are seeing, but I haven't 
*tried* and I'd be happy for anyone to prove the contrary.

>> I would be extremely happy to see a "live renderer", don't get me wrong
>> - but I am not exactly over-optimistic that we'll have it within the
>> next half year.
> 
> It is a solved problem. See http://labs.metacarta.com/osm. We just have
> to get updates into it as they happen, rather than once a week. PostGres
> triggers (or rules) are almost certainly capable of doing this.

When saying "live renderer", I was referring to something that uses live 
data. The solved part is creating PNGs from specially prepared data on 
the fly; the unsolved part is special-preparing our data in real time. I 
see all sorts of problems looming, but maybe I am just overly skeptical. 
If you get this to work, it would surely be a very big step forward, and 
you'd have my respect.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'




More information about the talk mailing list