[OSM-dev] OSM cgimap GSOC 2013 report #2

Paul Norman penorman at mac.com
Sat Jun 29 05:49:48 UTC 2013

The theme of this week was refactoring and learning about boost

1) What have I completed this week?

Aside from some assorted minor fixups, the bulk of the week was figuring out
how to refactor part of cgimap. Cgimap has a changeset cache, which stores
changeset information locally to reduce lookups. There was apidb-specific
SQL in the changeset cache, but also the cache concept is inappropriate for
pgsnapshot, and was badly violating the backend abstraction and blocking me
from working on the /node/# call. Matt laid some of the groundwork for
refactoring, and I got the changeset_cache code out of the xml and json
writers, and now it only exists in main.cpp and apidb code, and should allow
me to get back to pgsnapshot.

Many thanks to Matt for some help with boost and getting started on the
changes needed in the refactoring.

Or, expressed another way:

and lots of assorted yak-shaving

2) Next week

Now that I have a working node/# call I want to go back and optimize some
inefficiencies that I know exist in both the selection and serialization
code. Because nodes are the most common type and the node? call is heavily
hit, it's important that they be fast. It also makes sense to do some
optimization now, both because there are some really obvious parts that I
know are problems and because there are parts of node code that will be in
common with ways and relations, and I want to only optimize that part once.

I also intend to finish the other single-element queries.

After that I need to spend half a day looking at if I can use lighttpd to
redirect other queries to the main API, so I can actually start testing in a

3) Stumbling blocks

Having to refactor the changeset cache was a huge stumbling block

More information about the dev mailing list