Follow

Does anyone know of literature on how to synchronize text between a browser and a server with as little bandwidth as possible?

The particular scenario I have in mind is that the browser knows the text currently on the server, as well as the text that the server should be updated with.

The easiest thing to do is just send the whole text every time there is an update, but my goal is to transfer less data over the network (for small mobile data plans).

The next thing I could do is send only the lines that have changed, but that assumes that the text is broken into lines.

Does anyone know of papers that address problems similar to this?

@philipwhite Do a replace to make each sentence one line, then use normal diff?

Or write your own custom diff...
alex.dzyoba.com/blog/writing-d

@philipwhite
Looks like you're trying to write a text editor 📎!
Atom's teletype uses commutative replicated data types. (github.com/atom/teletype-crdt) may be a little overkill (server to client changes possible), but it has some links which may be worth reading.

Sign in to participate in the conversation
Functional Café

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!