[OSM-dev] relations refering to deleted objects

Richard Fairhurst richard at systemed.net
Wed May 26 12:26:41 BST 2010

Mitja Kleider wrote:
> Did I get it right that you are directly writing to the database? 


Potlatch talks to amf_controller.rb which talks to exactly the same Rails
methods as the XML API. There is no direct writing to the database. The
integrity checks are carried out at model level so apply equally.

Potlatch is written in the first version of ActionScript (AS1) which has
pretty atrocious XML support. It therefore uses Flash's binary transport
format, called AMF (Action Message Format), hence the need for a dedicated

So the two differences are the transport format, and that some of the
methods are slightly differently structured (e.g. there's something that
equates to a putative PUT /way/<id>/full). Most of the latter is because
Potlatch and amf_controller were originally written in autumn 2006, before
OSM moved to Rails; the old Ruby-only API was much more primitive than what
we have now. The two have converged since, though there are still a couple
of things (e.g. full history/undelete) that have no equivalent in the XML
API yet.

amf_controller in early versions did use SQL rather than Rails methods. This
was a long time ago - it changed to Rails in July 2008 if my notes are
correct (coinciding with Potlatch 0.10). amf_controller is now very stable
and I don't think there have been any bugs raised against it for ages.

Potlatch 2 is written in ActionScript 3 which has better XML support. At
present it is capable of reading in AMF and both reading/writing in XML. I
would anticipate that parts of the API may become format-agnostic in the
future, equally capable of speaking XML, AMF, JSON or whatever; and that
some of the methods that are currently only available via amf_controller may
also be offered via the (currently XML) API.

View this message in context: http://gis.638310.n2.nabble.com/relations-refering-to-deleted-objects-tp5090823p5102929.html
Sent from the Developer Discussion mailing list archive at Nabble.com.

More information about the dev mailing list