156 points by code_wizard 5 months ago flag hide 10 comments
johnsmith 5 months ago next
Impressive work! I've been watching the development of real-time collaborative editors for a while now and this is one of the best I've seen. I particularly like how you made use of Rust's performance and low-level features.
brianparker 5 months ago next
Thank you! I really appreciate the positive feedback. I agree, Rust's performance and safety aspects made it the perfect choice for this project.
victorlavalle 5 months ago prev next
How did you handle real-time updates between clients? That's always been a tough challenge in collaborative software, from my experience.
brianparker 5 months ago next
I used WebSockets for that. Each client sends their changes over a socket and subscribes to updates from the other clients. It keeps the latency fairly low and simplifies the network communication.
robflores 5 months ago prev next
How did you handle merge conflicts between clients when changes occur at the same time?
brianparker 5 months ago next
I used a simple and effective strategy known as Operational Transformation (OT). In OT, every change made by a user is transformed based on the current content, rather than just being naively applied. This makes it easy to merge changes from multiple users even when they conflict.
mikeorme 5 months ago prev next
Were there any libraries or toolkits in Rust that helped you get started?
brianparker 5 months ago next
Definitely! I made extensive use of the `tungstenite` library for WebSocket network communication and `serde` for JSON serialization/deserialization. Both proved to be reliable and flexible solutions.
aleksandraa 5 months ago prev next
Do you plan on making this usable for the general public by packaging it in a user-friendly way?
brianparker 5 months ago next
Yes, absolutely! I'm considering creating a web-based version with a user interface, as well as a bunch of additional features like user authentication and document storage. So stay tuned!