77
Operational Transformation The Secret behind Google Docs, Google Wave and Zoho Suite:

Operational transformation

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Operational transformation

Operational Transformation

The Secret behind Google Docs, Google Wave and Zoho Suite:

Page 2: Operational transformation

Who I am

Matteo Collina

Twitter: @matteocollina

Website: matteocollina.com

Page 3: Operational transformation

What do I do?

Page 4: Operational transformation

I study a lot..

CCAC North Library http://www.flickr.com/photos/ccacnorthlib/3554627894/in/photostream/ CC by 2.0

Page 5: Operational transformation

...and today I'll speak about whatI've studied!

CCAC North Library http://www.flickr.com/photos/ccacnorthlib/3554627894/in/photostream/ CC by 2.0

Page 6: Operational transformation

We will see...

Page 7: Operational transformation

We will see...

1. Why Real Time is cool

2. Why we are solving the wrong problem

3. An algorithm to rule them all

Page 8: Operational transformation
Page 9: Operational transformation
Page 10: Operational transformation

is all about interaction..

Page 11: Operational transformation

..between people,

Page 12: Operational transformation

that acts through Browsers,

Page 13: Operational transformation

that communicate through a server!

Page 14: Operational transformation
Page 15: Operational transformation
Page 16: Operational transformation

We can create new forms of collaboration!

Page 17: Operational transformation
Page 18: Operational transformation

There are LOTS of frameworks

Page 19: Operational transformation

There are LOTS of frameworks...

Page 20: Operational transformation

...and companies!

Page 21: Operational transformation

...and companies!Thanks!

Page 22: Operational transformation

The frameworks are solving

1. How we present the data to the user

2. How to transfer the data on the wire

Page 23: Operational transformation

Where is the interaction between

people?

Page 24: Operational transformation

What happens when they change the same

document?

Page 25: Operational transformation
Page 26: Operational transformation

Really?

Page 27: Operational transformation

Johannes Gilger http://www.flickr.com/photos/heipei/3236351860/

Page 28: Operational transformation

How can we handle

conflicts?Johannes Gilger http://www.flickr.com/photos/heipei/3236351860/

Page 29: Operational transformation

Can users understand

this?Johannes Gilger http://www.flickr.com/photos/heipei/3236351860/

Page 30: Operational transformation
Page 31: Operational transformation

We usually lock our documents to protect them!

Page 32: Operational transformation

Only the user that locked the document can edit it!

Page 33: Operational transformation

Some people are doing it correctly..

Page 34: Operational transformation

Some people are doing it correctly..

..how?

Page 35: Operational transformation

What happens when we edit a document?

Page 36: Operational transformation
Page 37: Operational transformation

Insert(0,"hello ")

Delete(6, 5)

Insert(6,"world")

Page 38: Operational transformation

s = "jsday"

s = "hello jsday"

Insert(0,"hello ")

Page 39: Operational transformation

s = "hello jsday"

s = "hello "

Delete(6, 5)

Page 40: Operational transformation

s = "hello "

s = "hello world"

Insert(6,"world")

Page 41: Operational transformation

The operations are processedas they arrive: what happens if there are more users sending them?

Page 42: Operational transformation

What happens if the operations come from

two users?

Page 43: Operational transformation
Page 44: Operational transformation

sA = "hello world" sB = "hello world"

Page 45: Operational transformation

sA = "hello world" sB = "hello world"

What happens if operations get

delayed?

Page 46: Operational transformation
Page 47: Operational transformation

sA = "hello jsday" sB = "hello world"

Page 48: Operational transformation
Page 49: Operational transformation
Page 50: Operational transformation

Operational Transformation

Page 51: Operational transformation

➡ has been a research topic for more than 20 years

➡ is a family of algorithms

❖ Jupiter has lead to Google Docs / Wave

Operational Transformation

Page 52: Operational transformation

Operational Transformation

1.reorders the operations

2.handles the conflicts between operations

3.garantees the same result on all nodes

Page 53: Operational transformation

Reorder Problem

Page 54: Operational transformation

How can we reorder the operations?

Page 55: Operational transformation
Page 56: Operational transformation

What is the intention behind

the delete?

Page 57: Operational transformation

s = "hello jsday"

s = "hello "

Delete(6, 5)

The intention behind the delete is to remove the "jsday" string

Page 58: Operational transformation

Delete(6, 5) Delete'(12, 5)

Insert(6,"world")

Page 59: Operational transformation

Delete(6, 5) Delete'(12, 5)

Insert(6,"world")

OT transposes the Delete through the Insert

Page 60: Operational transformation
Page 61: Operational transformation

s = "hello worldjsday"

s = "hello world"

Delete'(12, 5)

Page 62: Operational transformation

s = "hello worldjsday"

s = "hello world"

Delete'(12, 5)

OT is about changing where and how the ops

are executed

Page 63: Operational transformation

What happens if two users delete the same string?

Page 64: Operational transformation

Delete(6, 5) NoOperation

Delete(6, 5)

What happens if two users delete the same string?

Page 65: Operational transformation

Operational Transformation

reorders the operations

handles the conflicts between operations

garantees the same result on all nodes

Page 66: Operational transformation

Unfortunately, there is some nasty

math involved!

Page 67: Operational transformation

http://www.flickr.com/photos/oneaustin/1261907803

DEMO!!!

Page 70: Operational transformation

TL;DR

http://www.flickr.com/photos/evilaugust/3307382858

Operational transformation:• allows to build true real time

applications;• is really hard;• garantee the same results for

every users!

Page 72: Operational transformation

..but we started with a question!

Page 73: Operational transformation

What do I do?

Page 74: Operational transformation

• Ph.D. Student

• Software Engineer @ Mavigex

• Conference Speaker (?)

What do I do?

Page 75: Operational transformation

Choose your tools wisely!

http://www.flickr.com/photos/chuffy/186676221

Page 76: Operational transformation

Thank You!

Page 77: Operational transformation

Any Questions?