E
E
Eugene2014-05-04 18:27:43
PHP
Eugene, 2014-05-04 18:27:43

NodeJS concurrent write to one file

Hello.
I would very much like to know how to organize parallel recording into one file.
There is no need to simply append to the end of the file. The file can be changed up and down. How to implement it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Keith, 2014-05-05
@evgeniy_p

You need to take the diff library - for example: jsdiff . After editing, send a patch to the server, which you apply to the text. If users edit different sections of the text, both changes will remain, but if one section, then you need to think about resolving conflicts. The simplest - "who is the last - that and slippers."

D
Dmitry Snegirev, 2014-05-04
@Rikkit

how databases are created

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question