Transcript
Page 1: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

http://Learning-Layers-eu 1

Page 2: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

• Real-time collaboration beyond Google Docs

• Need of a scalable, easy-to-use framework

2

Collaboration

Engine

Page 3: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

• Solving conflicts in real-time collaboration

• Architectures

– Peer-to-peer

• Components

– Collaboration Engine

– Communication component

3

Page 4: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

4

http://y-js.org/examples/

Page 5: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

• Text

• Json

• XML (DOM)

But: possible to customize it for arbitrary ones!

5y-js.org/examples

Page 6: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

• XMPP

– Uses XEP-0045 (Multi-User Chat)

– Prosody XMPP server

• WebRTC

– Uses PeerJS for messaging

• .. (you can create your own connector)

6

1.var connector = Y.XMPP().join("my-roomname");

y-js.org/examples

Page 7: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

• Similar behavior for other data types

7

1.var y = new Y(connector); //yjs object

//add a new property

2.y.val("new_object",“a_value“);

3.y.val("number",4)

4.y.val() // => {string:“a_value“,number:4}

y-js.org/examples

Page 8: Yjs: A Real-Time Framework for Peer-to-peer Group Editing on Arbitrary Data Types

• Real-time collaboration on arbitrary data types• P2P message propagation• Arbitrary communication protocols

– XMPP Connector: scalable (>1000 users)– WebRTC: fast

• Easy to use• Offline editing (unimplemented)• Undo (unimplemented)

Try Yjs yourself:

https://github.com/rwth-acis/yjs8


Recommended