[OSM-dev] The future of Potlatch

Christopher Schmidt crschmidt at metacarta.com
Fri May 2 12:38:36 BST 2008

On Fri, May 02, 2008 at 12:27:38PM +0100, Tom Hughes wrote:
> > I won't pretend that I know nearly as much about the rails code as you
> > do, but it seems like some of these would be better abstracted out. If
> > that were the case -- that is, that all the Rails code on the site used
> > the same underlying methods to talk to the database, given a 'fixed'
> > API, and amf_controller was just about encoding the returned data into
> > AMF -- then I thiink it would be possible to change the underlying slow
> > methods into SQL (after proper profiling), because the main reason not
> > to is 'maintaining two different codebases sucks', rather than 'no one
> > likes SQL over rails'.
> If I thought Steve would let me get away with doing raw SQL instead
> of using the rails object model I might have done so long ago ;-)
> Doing so would bypass all the integrity checks though, which is
> bad - that's a side effect of having the integrity checks in the
> wrong place (the rails object model rather than the database).

Some things don't require referential integreity: selecting ways/nodes
within a bounding box can't hurt the referential integrity of the
database (so long as the code is well-maintained), so the harm in
converting those methods (which are probably the single most performance
important aspect of Potlatch?) to SQL is relatively low, so far as I can

Christopher Schmidt

More information about the dev mailing list