On Mon, Oct 31, 2011 at 09:10, Torben Weis <torben.w...@gmail.com> wrote:
> Hi,
>
>> Interestingly, there is still a potential issue if you don't reuse session 
>> IDs:
>>
>> Client: submit op X at version 100
>> <client detects network error, but server does not>
>> Client: Reconnect
>> Server: Ok. 10 new ops since you connected
>> Client: submit op X' at version 110
>> Server gets op X at version 100 (first submission)
>> Server gets op X' at version 110 (second submission)
>
> I think the client simply should not do this.
> Never send an op, then transform it, and then re-send the transformed op 
> again.
> If you want to resubmit, then resubmit the exact same version, i.e.
> repeat "X at version 100".

Never say never :)  Wave's design is that servers reject operations
that target a version that is too far below the current version, to
force the client to do the (potentially expensive) transform.  In such
situations, where the client knows that the server rejected the
original submission, there's nothing wrong with transforming and
resending.

(Similarly, transform & resend would work fine in situations where the
client knows that the server never received the original submission;
but that's more difficult to determine if we want to be immune to
arbitrary network delays.)


> This way the problem you mentioned cannot arise.

Does that really avoid the problem?  Even without transforming,
repeating the submission at version 100 still leaves us with a
duplicate that we need to detect somehow.  If the client reconnects
with a new client id, the duplicate will look like a different
operation.

Christian.

Reply via email to