IEEE-NITK / codeshare

A web-based code editor for real time collaborative editing
3 stars 6 forks source link

Server side CRDT #14

Open shanthanu9 opened 4 years ago

shanthanu9 commented 4 years ago

If we are going to implement server-side CRDT support, we just have to implement the remote functions right? These functions don't use the findNextGreaterIdentifierList. So the server-side implementation is relatively easier than client-side.

But even if we do it, it raises another issue. CRDT will be implemented in two places, client and server-side. So if say make changes in client-side CRDT implementation, we will also have to change the server-side too. The split-up of the dependent code is not nice.

Another possibility is Elixir calling the already implemented client-side JS CRDT. If it is possible, then it is among the simplest solutions. But will this approach have a performance impact?

rohit-mp commented 4 years ago

I could find libraries to only execute javascript functions from elixir. Would that maintain the state variables too? Since the CRDT object lives for as long as the channel is open, I don't think it's a good idea to just run the javascript in elixir.

Repeating the same functionality in elixir again might be a better option