47

Serverless collaboration

 5 years ago
source link: https://www.tuicool.com/articles/hit/y2Qv6z3
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

03 Mar 2019

Previously I've worked on a collaborative tool, which worked like Google Docs. This project was calledcrepl. Because I stopped paying for hosting of its server, that project is now offline. That made me consider: what if a collaborative editor wouldn't need a server?

The server in crepl was needed to handle the connections between all the clients and the algorithm for collaborative editing needed a central server. For both there are alternatives that do not need a server.

Browsers can connect to eachother over a network without a central server using WebRTC, of which there is a nice example here . This works well on local networks with modern browsers. Through firewalls and older browser this is less likely to work.

Crepl uses Operational Transformation and needs a central server for correctness. Algorithms for collaborative editing that do not need a central servers can be found in the conflict-free replicated data type (CRDT) research. Through the excellent Automerge project I found the RGA algorithm.

Cljs-collab is the beginnings of a serverless collaboration system, which works between two browsers. It is a single page with all the logic in the client javascript, which is downloaded as a single file.

This project is serverless by not requiring any server after downloading the page. That's even fewer servers than most serverless systems.

Try the serverless collaborative editor:cljs-collab

2EfmIvZ.png!web

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK