Question

I am looking to the derby multiplayer notepad. I am wondering what would be the best way to implement something like a cursor for the other people editing. Something like in google docs / etherpad for instance.

In general, I am looking for the following :

  • is there something build-in derbyJS to tell who made the edits ? Or can we modify the way the synchronisation is done ?
  • alternatively, what means of communications do I have, and which one would integrate better with derby ?

PS: I saw this question, but it doesn't really help me regarding the synchronization.

Was it helpful?

Solution

You will have to enforce authentication in your application. I suggest you get the derby-auth npm module and use that to authenticate.

Once your user is authenticated you can then pass their handle (see Passport) back to every edit request to your server, then push that info back out to the connected clients.

See https://www.npmjs.org/package/derby-auth

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top