Kevin Barrett is a writer and programmer in the Washington, DC area. Together with Sloane Perrault he founded screen.garden, a backend, website, and Obsidian plugin for turning Obsidian into a web-enabled, highly collaborative documents platform like Notion or Google Docs. He adores the BEAM and is convinced it is a superpower for companies and individuals alike.
Level: Intermediate
Conflict-free Replicated Datatypes (CRDTs) allow for distributed, p2p-style workflows where users generate data without conflicts. At screen.garden we wrap Yjs, a CRDT, inside a NIF to push business logic down into clients. This pairs surprisingly well with the BEAM, as we can manage those CRDTs inside stateful processes to turn a fundamentally imperative data structure into a functional one. We can also embrace the BEAM’s model of “let it crash” by using the conflict-free part of CRDT to rehydrate state within the BEAM without concern for data corruption or incomplete client-server syncs. All of this allows for fine-grained sync between a server and many devices, without conflicts and without fear of downtime.
OBJECTIVES:
AUDIENCE: