On Jan 31, 9:07 pm, John Barstow <[email protected]> wrote:
> On Mon, Feb 1, 2010 at 1:46 PM, Turner <[email protected]> wrote:
>
> > But what are A' and B'? How are they different? It might be helpful
> > for me to work on an example. Let's say the server is trying to apply
> > the following operations to a document with content ABCD:
>
> > A: insert(1, "CD") (insert "CD" at position 1)
> > B: delete(2, 1) (delete 1 character starting from position 2)
>
> > Once the transformer has done its thing, it seems to me that A' should
> > be something like {insert(1, "CD"); delete(4, 1)}, and B' should be
> > the same. Or am I combining the work of the Transformer and Composer
> > together? Would A' = A = insert(1, "CD") and B' = delete(4,1), and the
> > composer then slap them together in the right order? I feel like I'm
> > probably missing something here.
>
> Your second interpretation is correct.
>
> A' - insert(1, "CD") <-- this could originally be two individual
> inserts composed into a single one by the client.
> B' - delete(4, 1)
>
> What this looks like on the server:
> v1 = ABCD
> v2 = v1 + A  (or v1 + B if applied first)
> v3 = v2 + B' (or v2 + A' if B applied first)
>
> On client A:
> v2 = v1 + A (sends A to server)
> v3 = v2 + B' (gets B' as part of reply)
>
> On client B:
> v2 = v1 + B (sends B to server)
> v3 = v2 + A' (gets A' as part of reply)
>
> On client C:
> no edits; just asks for updates since v1
> v2 = v1 + [A,B'] <-- here's an example where the Composer might be
> applied, to reduce the number of operations sent to the client
> (or, if B was applied first by the server, v1 + [B,A'] )
>
> This is obviously a simplification. The server actually tracks the
> version number, and "last known version" is always part of the delta.
>
> Hopefully this makes things clearer.

Yes, it does. I think I understand it now. So the Transformer is where
the OT magic goes on, and the composer is more of a performance
enhancer (or "compression", as you said). Thanks for your explanation,
John.

-- 
You received this message because you are subscribed to the Google Groups "Wave 
Protocol" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wave-protocol?hl=en.

Reply via email to