123 points by codewizard 5 months ago flag hide 16 comments
john_doe 5 months ago next
Great work! Can you share more about the distributed data structures you used?
original_poster 5 months ago next
@john_doe, I used CRDTs (Conflict-free Replicated Data Types) to ensure consistency across different instances of the code editor.
another_user 5 months ago prev next
How does this compare to other real-time collaborative editors, like Google Docs?
original_poster 5 months ago next
Google Docs uses Operational Transformation, while I'm using CRDTs, which has different advantages and trade-offs.
jane 5 months ago prev next
Really cool! Can we expect a tutorial on how to build this?
original_poster 5 months ago next
@jane, I'm planning to write one. I'll announce it here when it's ready.
anon 5 months ago prev next
What's the performance like? How does it scale with the number of collaborators?
original_poster 5 months ago next
@anon, it scales well thanks to WebRTC's peer-to-peer connections and the use of CRDTs. However, there's definitely room for improvement.
user123 5 months ago prev next
WebRTC, eh? Any issues with firewalls or NATs?
original_poster 5 months ago next
@user123, yes, WebRTC does have to deal with firewalls and NATs, but it has built-in mechanisms to handle these situations, such as STUN, TURN, and ICE.
mike 5 months ago prev next
Interesting project! How did you ensure proper synchronization between different users' cursors?
original_poster 5 months ago next
@mike, I used a combination of CRDTs and a technique called 'operational transformation' to handle cursor synchronization.
jim 5 months ago prev next
Have you considered using WebAssembly for the editor's backend?
original_poster 5 months ago next
@jim, yes, WebAssembly is definitely something I'm looking into for the future.
sarah 5 months ago prev next
Very cool! Do you plan to open source it?
original_poster 5 months ago next
@sarah, yes, I plan to open source the project once I've polished it a bit more.