On Jan 31, 4:31 pm, John Barstow <[email protected]> wrote:
> On Mon, Feb 1, 2010 at 5:31 AM, Turner <[email protected]> wrote:
> >> Transformer is the magic that makes OT worthwhile. Transformer will
> >> take edits that diverge from a common root and transform them such
> >> that they can be composed together.
>
> > What does that process entail? If it's fed a DocOpStream1 and
> > DocOpStream2, does it output two identical streams with DocOp1a being
> > composed with DocOp2a and DocOp1b being composed with DocOp2b, and so
> > on? I thought that composing concurrent ops into one single op was
> > what the composer did.
>
> Given operations A and B, transform will produce an A' and B' (ie,
> *transform* the operations into new ones). Generally it's applied like
> such:
>
> Client sends operation D to the server. The server has operations [A,
> B, C] that client doesn't know about yet. The server transforms each
> operation by D;
>
> transform (A, D) -> A', Da
> transform (B, Da) -> B', Db
> transform (C, Db) -> C', D'
>
> [A', B', C'] is sent back to the client (potentially you could compose
> them into a single operation ABC' first). D' is added to the server
> history.
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.
>
> I find it helpful to think of Composer as a sort of compression;
> instead of sending 4 operations, I can compose them and send one.
> Transformer, on the other hand, I think of as fiddling with buffer
> offsets to make edits show up in the right place. Please note that
> this is just an analogy.
--
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.