designing an api for a real-time collaborative editor. dont you think thats a tough one?
Jaya Safira
·8265 views
I'm building out the system design for a real-time text editor, you know, like Google Docs. The biggest hurdle is creating an API that can smoothly manage edits from lots of people at once. We need to make sure the data stays consistent and things feel fast for the users. On the backend, we're looking at either Operational Transformation (OT) or Conflict-free Replicated Data Types (CRDTs). So, what should we be thinking about when designing the API? Should we go with a WebSocket API so users can send operations directly, or a RESTful API where we poll for updates or use Server-Sent Events? What are the pros and cons of each way regarding how complicated it is, how well it scales, and how it feels to use?
26 comments