Carlo Rapisarda

iOS Tech Lead, Bontouch

Talk Title

Building a real-time collaboration tool using CRDTs and Kotlin Multiplatform

Room

Hamilton

Date

27.10.2022

Time

13:10 > 40 min

Share

on Twitter

A quick introduction to conflict-free replicated data types (CRDTs) and how you can use these to build a real-time collaborative tool, where multiple clients can make edits to the same data without conflicts, even while offline. We will go through an example of a solution we’ve built that relies on CRDTs in a Kotlin Multiplatform library, for native mobile, web frontend, and backend, with some learnings and tips along the way.

You will learn:

- The basics of Conflict-free Replicated Data Types and Hybrid Logical Clocks which enables distributed computing, where operations can be sent and received from other nodes and data ends up in an eventually consistent state.
- Learnings and tips from building such a realtime CRDT solution in a Kotlin Multiplatform library, consumed in Android, iOS, Web (TypeScript), and backend (Ktor), with communication via websockets.
- The effects on the way data is modeled and stored when using CRDTs, and solutions for common operations (deletion, maintaining ordering of objects, relations between objects, undo/redo, etc).
- How you can use CRDTs to build an offline-first and realtime multi-client app without worrying about complex syncing logic.
- Some recommendations and advice for architectural decisions regarding Kotlin Multiplatform, especially as consumed from non-JVM targets.

Speaker Bio

Lead iOS Developer, Bontouch

Menu