Carlo Rapisarda

iOS Tech Lead, Bontouch

Talk Title

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






13:40 > 40 min


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

Tinkering with computers since I was 14, mostly on Apple platforms. I have worked with native iOS and macOS development, but also with multiplatform frameworks, including React Native, Kotlin Multiplatform, and Mac Catalyst. I love to explore new technologies and challenge established ideas. Talk to me about Mobile Development, Augmented Reality, Deep Learning.