On Fri, Oct 28, 2011 at 9:29 AM, Christian Ohler <oh...@google.com> wrote: > On Thu, Oct 27, 2011 at 15:02, Joseph Gentle <jose...@gmail.com> wrote: >> I wonder if its wire protocol can be made compatible with sharejs. > > I took a brief look at > https://github.com/josephg/ShareJS/wiki/Wire-Protocol and the > protocols seem to be designed a bit differently. How does sharejs > handle the situation where a client sends an op, gets disconnected > without knowing if the server received it, then reconnects? How can > it tell whether to re-send the op? > > Walkaround solves this by assigning a random client id to each client > and storing that together with each op. That way, when the client > reconnects and catches up with the ops that happened in the meantime, > it can recognize its own ops; and the server can detect duplicate > submissions from the same client at the same version. > > Christian.
I'm not dealing with that case correctly yet in ShareJS. I was thinking of doing something else, but I think your design is better. I already have client IDs. I'm planning on adding sequence numbers as well and using a client ID + sequence number pair to uniquely identify submitted ops. Can walkaround deal with other (non-wave) data types? It looks like the protobufs are tightly bound to wavelets and documents. -J