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