I really like the architectural decisions made in the project. OperationalTransform library may need some work like testcases and add more powerful constructs. Is there any theory behind it? Maybe add a link to it.
I believe this project can become a popular opensource project. It is really fast.
Thanks! Operational transformation is the same technology that powers Google Docs. It's been studied in academia for real-time collaboration since the 1990s and has eventual consistency guarantees. See the Wikipedia article: https://en.wikipedia.org/wiki/Operational_transformation
The Rust operational-transform library was not written by me, but it's listed on crates.io by spebern, and it's worked wonderfully so far. It seems to be a very close port of ot.js (https://github.com/Operational-Transformation/ot.js). The text transformation algorithm isn't very complicated (<700 SLOC including tests), but there's probably room for optimization!
Looks nice and clean! Also feels very snappy in two tabs.
However, you're breaking the back button with your redirect to a unique room. Once in a room, pressing back will join a new room. History replace instead of push should be a better choice.
Thanks for making this, I have been looking for a worthy replacement of Etherpad for a long time, that is easy to use and has the option to be self-hosted.
Glad you like it! Etherpad is a big inspiration for me, and I hope to read into the code someday. They have a more sophisticated OT algorithm for rich text.
Could end-to-end encryption be added (see cryptpad), or does operational transformation or some other design aspect require a central server?
What also comes to mind when editing source code is a non-browser participant which can actually run and test the code (or for other non-interactive backends, such as en external spellcheck).
Good question! I'm not aware of any end-to-end encryption scheme that commutes with OT, so probably can't do it as long as you have a central server doing transformations like Rustpad.
That said, if you use a sequence CRDT-based editor like Yjs, this avoids the central server problem entirely. Rustpad is a small branch-off of a longer-term project / product I've been working on which requires collaborative editing, so having a central server was part of the equation from the start.
Very cool! Thanks for sharing. Was binding Monaco particularly challenging?
I’m curious what the larger project/product is, if you are able to share.
I’ve used ShareDB (from @josephg in this thread) for a collaborative coding project with Jupyter as the execution backend. I just geek out seeing OT/CRDT projects in the wild :)
[+] [-] re|4 years ago|reply
[+] [-] _9rq6|4 years ago|reply
I believe this project can become a popular opensource project. It is really fast.
[+] [-] ekzhang|4 years ago|reply
The Rust operational-transform library was not written by me, but it's listed on crates.io by spebern, and it's worked wonderfully so far. It seems to be a very close port of ot.js (https://github.com/Operational-Transformation/ot.js). The text transformation algorithm isn't very complicated (<700 SLOC including tests), but there's probably room for optimization!
[+] [-] jdellinger|4 years ago|reply
However, you're breaking the back button with your redirect to a unique room. Once in a room, pressing back will join a new room. History replace instead of push should be a better choice.
[+] [-] ekzhang|4 years ago|reply
[+] [-] messo|4 years ago|reply
[+] [-] ekzhang|4 years ago|reply
[+] [-] em-bee|4 years ago|reply
can etherpad documents be exported, converted to rustpad?
[+] [-] zeotroph|4 years ago|reply
What also comes to mind when editing source code is a non-browser participant which can actually run and test the code (or for other non-interactive backends, such as en external spellcheck).
[+] [-] ekzhang|4 years ago|reply
That said, if you use a sequence CRDT-based editor like Yjs, this avoids the central server problem entirely. Rustpad is a small branch-off of a longer-term project / product I've been working on which requires collaborative editing, so having a central server was part of the equation from the start.
[+] [-] jayunit|4 years ago|reply
I’m curious what the larger project/product is, if you are able to share.
I’ve used ShareDB (from @josephg in this thread) for a collaborative coding project with Jupyter as the execution backend. I just geek out seeing OT/CRDT projects in the wild :)
[+] [-] petespeed|4 years ago|reply
Some feedback:
1. I was not able to change color when setting user name. (Was it some browser extension blocking it?)
2. I was not able to run your docker image on pi (arm). The error is: standard_init_linux.go:219: exec user process caused: exec format error
Works fine otherwise on other platforms.
[+] [-] ekzhang|4 years ago|reply
Unfortunately the Docker image is built on an x86_64 platform.
[+] [-] brundolf|4 years ago|reply
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] executive|4 years ago|reply
[+] [-] ekzhang|4 years ago|reply
[+] [-] luke2m|4 years ago|reply
[+] [-] alphabet9000|4 years ago|reply