https://github.com/brotherjing/scalable-ot
A scalable concurrent collaboration framework based on Operational Transformation (OT)
https://github.com/brotherjing/scalable-ot
collaborative-editing operational-transformation ot spreadsheet
Last synced: 5 months ago
JSON representation
A scalable concurrent collaboration framework based on Operational Transformation (OT)
- Host: GitHub
- URL: https://github.com/brotherjing/scalable-ot
- Owner: BrotherJing
- License: mit
- Created: 2019-10-11T02:24:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T06:53:56.000Z (over 3 years ago)
- Last Synced: 2024-04-17T23:55:32.384Z (about 2 years ago)
- Topics: collaborative-editing, operational-transformation, ot, spreadsheet
- Language: TypeScript
- Size: 388 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# scalable-ot
A scalable concurrent collaboration framework based on Operational Transformation (OT).
Inspired by [sharedb](https://github.com/share/sharedb).
### Examples
Text editor

Spreadsheet

### Architecture

1. Clients send operations through API.
2. Operations are pushed into MQ, partitioned by document id.
3. OT server receives operations of same document sequentially and performs conflict solving.
4. Broadcast server sends conflict-free operations to clients.
5. Conflict-free operations are pushed into another MQ(or db stream), trigger a consumer which apply them on document snapshot sequentially.
### Project Structures
```
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
```
### Features
- **Horizontal Scalable** Some services are implemented as Kafka consumer and are scalable in nature.
Some are backed by RPC framework like [Dubbo](https://dubbo.apache.org) 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.