A scalable concurrent collaboration framework based on Operational Transformation (OT).
Inspired by sharedb.
Text editor
Spreadsheet
- Clients send operations through API.
- Operations are pushed into MQ, partitioned by document id.
- OT server receives operations of same document sequentially and performs conflict solving.
- Broadcast server sends conflict-free operations to clients.
- Conflict-free operations are pushed into another MQ(or db stream), trigger a consumer which apply them on document snapshot sequentially.
scalable-ot
├── front // Client side code, including examples(textarea, spreadsheet)
├── ot-server // Server which consume client operations and produce conflict-free operations
└── proto // Protobuf definitions
scalable-ot-java-backend
├── scalable-ot-api // Front facing api
├── scalable-ot-broadcast // Web socket server which connect to clients
├── scalable-ot-consumer // Service which consume and apply conflict-free operations
├── scalable-ot-core // DTO, DAO, etc.
└── scalable-ot-kafka // Kafka related configurations
- Horizontal Scalable Some services are implemented as Kafka consumer and are scalable in nature. Some are backed by RPC framework like Dubbo and have been customized to be scalable and load balanced based on specific rules.
- Extensible Can be extended to support concurrent editing on other type of document by adding OT libraries.