Google Wave: Live Collaborating Editing

Author: David Wang. Link to original: http://www.youtube.com/watch?v=3ykZYKCK7AM (English).

Translations of this material:

into Russian: Google Wave: Одновременное совместное редактирование. Translation complete.
Submitted for translation by qmax 05.08.2009 Published 2 years, 1 month ago.

Text

Google Wave
Live Collaborating Editing

Wang: Hi. My name's David.
I'm from the Google Wave team.

I work on
the Live Concurrent Editing

that you've probably seen
in the last demo.

So how do we actually do it?

So the way we do it

is use a technology called
operational transformation.

It's been a very active
academic research area

for quite a while now,
about ten years.

And we've actually taken
that algorithm

and extended it to provide you
the live concurrent editing

that you're so used to now.

How does this all work?

So let me show you
with an example.

So imagine we had a client...

and we had a server...

and it all started
with the same state--

A, B, C and D.

Now, imagine the client
wanted to insert some character

between C and D.

So he now inserts, let's say, X
between the character C and D.

And the server actually wanted
to delete the character B.

So now he ends up
with the state A, C, and D.

Now, these happen concurrently.

So how do they communicate

that they've done these things
on both sides?

So what they do
is they send the action,

which we call operation
on the wire.

So the client sends an insert X
at position 0, 1, 2, and 3.

And the server
sends the operation

delete character B
at position 0 and 1.

So now when the other side
gets the message,

they could choose to blindly
execute it if they wanted to.

But what would happen

if you actually blindly execute
an operation?

So if the server executed
the operation from a client,

insert the X blindly,

you'd end up with the state
A, C, D, and X.

But that's clearly not what
the client wants to do.

So what we have to do

is go through a process
called transformation.

So what happens
is that the server

takes the client operation

and transforms against
its un-operation,

and it results in
a new operation

where he inserts calc X,
now position 2

because he has to subtract
a position

for its undeleted character.

And now the server
applies the operation,

and you end up with the state
A, C, X, and D.

The client, on the other hand,

does the exact same
transformation.

However, in this case,
it just happens

the operation gets transformed
into the exact same operation.

So the client now ends up
with B deleted

with A, C, X, and D.

So as you can see,

now both the client
and the server

ends in the exact same state

even though they have done
the operation concurrently

at different locations.

So why is this liveliness
important?

So let's take an analogy,
let's say.

Imagine you and your friend
walked in a cafe,

and you were just having a
conversation between each other.

When was the last time
you closed off your ears

and said to your friend,
"Wait, finish your sentence

and tell me about it
afterwards"?

Well, this is clearly what
we experience today

on instant messaging

where someone else
types a message,

and you wait for them
to finish.

You wait and wait and wait.

But you don't really wait
in the cafe

for your friend
to finish talking

before you listen
to him, do you?

It would really break
the flow of conversation.

Now, by making things live
and concurrent,

you now have a very
engaging conversation

just like how you would
actually talk to a person

where you can converse
very quickly.

One of the important things
we have done in Google Wave

is that we've chosen to use a
client and server architecture.

It's a very interesting
academic area

to use this complete client
system without any service.

However, we've purposely chosen
client/server architecture

because it allows us to scout
the large number of clients

without complicating the system.

So imagine in this case

we had a client, client one,

connecting to a server,

and another client
connecting to the server.

They now interact
to the server...

by communicating
and using the server

as a point of relay.

So what does that buy you?

What this buys you is that,
number one,

there is a single system
which holds the source of truth.

So even if the clients crash
or go offline for a long time,

there's one place where
you can go and fetch a document.

Pages: ← previous Ctrl next
1 2

© Google.