collaborative text editor multiple users distributed geographically can access the same document...

20

Upload: beverly-willis

Post on 30-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –
Page 2: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

COLLABORATIVE TEXT EDITOR• Multiple users distributed

geographically can access the same document simultaneously.

• CHARACTERISTICS– high concurrency– hidden latency– consistency

Page 3: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

SCOPE• EDITOR– distributed– 1D text only editor

• OPERATIONS– character-wise operation– insert a character– update• delete at index i • insert at index i

Page 4: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

SCOPE• Can be shared between any number

of users.• Achieves convergence– Temporary divergence is acceptable.

• Preserves causality of operations

Page 5: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

CHALLENGES• NO GLOBAL TIME–Distributed users.

• LATENCY– Latency is never zero.

• DIVERGENCE– Text at multiple site should converge.

Page 6: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

SOLUTION• LATENCY– document is replicated– each client/site gets a copy– PROBLEM• consistency issues• all the documents should converge to the same state.

• NO GLOBAL TIME– vector timestamps

Page 7: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

TERMINOLOGY• OPERATION– every action by user.– <INDEX, TYPE, CHAR, CID, VECTOR-TIMESTAMP>

ex: document is shared by three clients

CLIENT-1 INSERTS ABC

•<1,i , ‘A’, 1, (1,0,0)>•<2,i , ‘B’, 1, (2,0,0)>•<3,i , ‘C’, 1, (3,0,0)>

Page 8: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

TERMINOLOGY

Page 9: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

DIVERGENCE• initially documents

are identical

• executing independent operations causes the replicas to diverge

Page 10: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

OPERATIONAL TRANSFORMATION• Applying remote operations directly

makes the document inconsistent• Operational Transformation (OT) –

guarantees convergence.

Page 11: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

• Initially documents are identical.

• Transform remote operations to ensure convergence of documents.

Page 12: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

ARCHITECTURE

Page 13: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

ENTITIES

Page 14: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

SERVER/CLIENT COMPONENTSSERVER

CLIENTClient maintains client-Id, local cache, History Buffer, site’s vector timestamp.

Page 15: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

NEW DOCUMENTCREATE + RETRIEVE

Page 16: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

SYNC

Page 17: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

TECHNOLOGY STACK• FRONT END–HTML, CSS, JAVASCRIPT–BOOTSTRAP, jQuery, CODE MIRROR

• BACK END– JAVA– JERSEY FRAMEWORK

• COMMUNICATION– JSON

Page 18: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

DEMO

Page 19: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

REFERENCES• Chengzheng Sun and Clarence Ellis. 1998. Operational

transformation in real-time group editors: issues, algorithms, and achievements. In Proceedings of the 1998 ACM conference on Computer supported cooperative work (CSCW '98). ACM, New York, NY, USA, 59-68. DOI=10.1145/289444.289469 http://doi.acm.org/10.1145/289444.289469

• Chengzheng Sun, Xiaohua Jia, Yanchun Zhang, Yun Yang, and David Chen. 1998. Achieving convergence, causality preservation, and intention preservation in real-time cooperative editing systems. ACM Trans. Comput.-Hum. Interact. 5, 1 (March 1998), 63-108. DOI=10.1145/274444.274447 http://doi.acm.org/10.1145/274444.274447

Page 20: COLLABORATIVE TEXT EDITOR Multiple users distributed geographically can access the same document simultaneously. CHARACTERISTICS – high concurrency –

Thank you!!By

Ambika BabujiMalinipriya Goppannan Ravi

For COMP 512