Using the OT Engine in a p2p connection

51 views
Skip to first unread message

Jack

unread,
Apr 3, 2014, 6:35:23 AM4/3/14
to open...@googlegroups.com
I'm currently writing my thesis about browser-based real-time collaboration over a p2p-network based on WebRTC. As far as I know most OT frameworks are designed for a client-server architecture, within which the server runs the OT engine and does the consistency transformations.

But after reading this paper http://dbis.rwth-aachen.de/~derntl/papers/preprints/collaboratecom2013-preprint.pdf I think the OT engine of opencoweb can be ported to a client-client OT model (p2p).

Are there any examples for this? What do you think about that, is it possible to use the OT engine on each client of the p2p network separately so that consistent editing is possible?

Regards
Jack

Brian Burns

unread,
Apr 3, 2014, 8:39:24 AM4/3/14
to open...@googlegroups.com
Jack,

OpenCoweb already does this.  The OT engine runs on every client and is a p2p model.  

Brian


--
You received this message because you are subscribed to the Google Groups "opencoweb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencoweb+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Casey Jordan

unread,
Apr 3, 2014, 10:11:40 AM4/3/14
to open...@googlegroups.com
@Brian, I am not an expert on OpenCoweb but I think Jack is talking about a purely distributed architecture. I do not believe that any text editing algorithm implemented in real world OT systems has yet to be able to satisfy the TP2 condition for convergence in a pure p2p network. Meaning OpenCoweb cannot be transformed work work with a serverless architecture.

Jack, that being said, this is mainly considerations around text maniuplation. Diagrams have different requirements for convergence depending on how the system is designed.

So with most methods the client and the server both do transformations. You might already know this, but instead of the server tracking the state of each client, each client tracks the server. Both do transformations, when operations come into the server, they are transformed against operations from other clients that have already occurred since that operation was received, then that operation is transmitted to other clients. The same thing occurs on the clients, transforming the new operaton which is in "server state space" against operations that have occured on the client since the last operation which was sent to the server. In this way the client is brought in sync with the server state. 

Can you tell us more about your thesis?
--
--
Casey Jordan
easyDITA a product of Jorsek LLC
"CaseyDJordan" on LinkedIn, Twitter & Facebook
(585) 348 7399
easydita.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.

Christopher Cotter

unread,
Apr 3, 2014, 10:27:54 AM4/3/14
to open...@googlegroups.com
The only thing the server in opencoweb does is append a total order to each message. Apart from that. it simply acts as a ferry for getting a message from browser A to browser B. If there were a mechanism for two browsers to communicate directly, we could do away with the server and use some other mechanism for totally ordering messages.

The server does have an OT engine, but this is only for the "moderator" server "client."

Look at the opencoweb/coweb-jsoe github project. It has an nodejs example that uses a communication server to send messages to listening clients and append a total order.

I believe there are OT algos that don't require a total order, but opencowebs also does require one.

Chris Cotter - on mobile

Casey Jordan

unread,
Apr 3, 2014, 10:39:59 AM4/3/14
to open...@googlegroups.com
@Chris, has anyone tested the algorithm thoughly that coweb uses. Unless the clients are working on the stipulation that they will not transmit more than one operation at a time to the server I don't think applying a simple total order is enough to ensure consistency (in TP2 condtion)

Casey Jordan

unread,
Apr 3, 2014, 10:43:48 AM4/3/14
to open...@googlegroups.com
FYI, if you don't use a total order you can use a simple state vector (Document hash or something similar), however this is probably overkill. If you aren't using a server, you need to use vector clocks/version vectors. I went down this path, using a total order is much simpler. 

Practically I don't see much of a benefit to a pure p2p, servers are cheap and they make the whole system super simple. That being said it is interesting from a research perspective.

Jack

unread,
Apr 3, 2014, 12:11:47 PM4/3/14
to open...@googlegroups.com
The RTCdataChannel that transports packages p2p from browser A to browser B can be configured as reliable, and ensures correct order of data sent over channel. But the OpenCoWeb OT engine needs requires a total order of **all packages from all clients**, right? Do you think this can be achieved with the RTCdataChannel, too?
In that case the server wouldn't be necessary...

Casey Jordan

unread,
Apr 3, 2014, 12:44:43 PM4/3/14
to open...@googlegroups.com
You could theoretically get a total order using timestamps (nano time to be safe), but then you have to ensure 100% that all clients are synchronized in terms of time. So then to do this reliably they need to be used a centralized time server to synchronize on. So you still technically have a server component, but there might be a margin of error there that is reasonable enough where you could eliminate the time server.

Casey Jordan

unread,
Apr 3, 2014, 12:47:09 PM4/3/14
to open...@googlegroups.com
and yes there needs to be a total order to determine what operations to transform against and how to break tie situations.
Reply all
Reply to author
Forward
0 new messages