2

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.

Community
  • 1
  • 1
nha
  • 17,623
  • 13
  • 87
  • 133

1 Answers1

2

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

Nikos
  • 7,295
  • 7
  • 52
  • 88
  • Thank you for your reply. I'm a bit confused. What is the relationship between derby-auth (which is apparently looking for a maintainer right now) and passport (or are you talking about derby-passport) ? – nha Mar 19 '14 at 18:49
  • hmm..derby-auth had a dependancy on passport. Derby-passport is middleware between derby and passport, I would stick to using that project now since d-auth is not being maintained – Nikos Mar 20 '14 at 09:45