[OSM-dev] Minute Diffs Broken

Matt Amos zerebubuth at gmail.com
Tue May 5 13:42:48 BST 2009


On Tue, May 5, 2009 at 12:50 PM, Frederik Ramm <frederik at remote.org> wrote:
> Matt Amos wrote:
>>> But being able to make a bunch of edits and process them in one
>>> transaction is new with 0.6 and not something that users actually
>>> demanded to have - it is something we thought could come in handy.
>>
>> doesn't it make the client coding much simpler to have an
>> all-or-nothing upload action? that was the assumption that i was
>> working under
>
> It does, but if the choice is either a more difficult client or a more
> difficult server then the former is easier to do.

given that we already have the difficult server...?

>> can JOSM split the single upload into multiple uploads within the same
>> changeset? perhaps having a tunable parameter to isolate "large" items
>> into their own separate upload?
>
> Certainly something we should think about.

patches welcome, right? :-)

>> 1. user on a slow connection hits "save", changeset created, client
>> begins diff upload
>> 2. server starts transaction
>> 3. client sends first element, which the server parses and saves
>
> So you are parsing the XML document incrementally? I always assumed that
> since Rails cannot do streaming XML output, neither would it be able to read
> XML that way.

the XML document is parsed incrementally to save memory, rather than
for its behaviour, but it appears that rails, lighty and fastcgi all
support streaming input. i am unsure if they all work together, but
the rails docs suggest that it does.

streaming input isn't nearly as difficult as streaming output. since
rails treats (most) uncaught exceptions as 500 errors, but the error
status is in the header, rails takes the safe option of having the
full response in a buffer before it returns the status header.

cheers,

matt




More information about the dev mailing list