[OSM-dev] Structured error messages from API

Ian Dees ian.dees at gmail.com
Fri Dec 11 18:24:46 GMT 2009


On Fri, Dec 11, 2009 at 12:13 PM, Matt Amos <zerebubuth at gmail.com> wrote:

> On Fri, Dec 11, 2009 at 5:05 PM, Matthias Julius <lists at julius-net.net>
> wrote:
> > Richard Fairhurst <richard at systemed.net> writes:
> >
> >> Tom Hughes wrote:
> >>> Basically, even if sending a streaming response from rails was
> >>> possible (which I'm not sure it is - it's certainly hard)
> >>
> >> You can do it using render :text=>proc, as amf_controller does. But I
> >> suspect this would be non-trivial to work into the existing XML API.
> >
> > The API could also return an URL which the client can poll to get the
> > status for an upload.
> >
> > This would also avoid issues with client timeouts.
> >
> > Currently, when the client hits a timeout and aborts the connection it
> > has no way of knowing whether the upload succeeded or not.  For new
> > data this creates duplicates when the user tries to upload again.
>
> i have been thinking about something similar, which would work along
> the following lines. the changeset is a container and POSTing a diff
> to it returns a 202 Accepted result if diff processing takes more than
> a few seconds. the result is a Location redirect to the individual
> resource for the diff upload, which could be polled for status.
>
> unfortunately, that's where it gets complicated. because the diff
> upload occurs in a transaction, none of its outputs are visible until
> it commits. therefore any status would need to be posted on a
> different connection, in a different transaction. this makes things
> annoying a messy. if anyone's got any ideas then i'd be very
> interested to talk.
>
> this is something that we can put into API 0.7 - which it might be a
> good idea to start thinking about now, since the last API took about a
> year to develop ;-)
>
>
Actually, I was just now creating a stub page for API 0.7 brainstorming:

 http://wiki.openstreetmap.org/wiki/API_v0.7

Remember, it's a brainstorm: all ideas are good ideas at this point... ;-).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20091211/5191e8f4/attachment.html>


More information about the dev mailing list