2

I am developing 2-4 players networks game. At the heart of the model there is a data structure that acts like a google-docs spreadsheet that everybody can edit in any time. For simplicity, each of the spreadsheet cells can contain only one letter.

Some abilities and requirements: 1. All players can edit a spreadsheet cell in any time. (that's means that there must not be a "locked cell") 2. All network transactions are reliable (but can arrive out of order)

I am having an hard time developing an algorithm for handling the shared spreadsheet-like data structure. Does someone familiour with a similar problem that have a solution? or suggest a simple way to solve the problem?

Thank you.

Yony
  • 680
  • 1
  • 9
  • 20

1 Answers1

1

I think you should try to define some criteria for the algorithm you are looking for. You may want a guaranteed response time. Or you might prefer absolute data consistency. It seems unlikely to achieve both at the same time.

The subject you are talking about is called Operational Transformation: http://en.wikipedia.org/wiki/Operational_transformation

Some open source software do amazing things in this field, like http://sharejs.org/ or http://etherpad.org/

Grapsus
  • 2,714
  • 15
  • 14
  • Great references. Exactly what I looked for. Thank you! – Yony May 04 '14 at 18:07
  • Can you add some information from the links into the answer (as to answer the question in the answer itself)? As it stands, the answer is a bit too dependent on the links. Related discussion - [Are answers that just contain links elsewhere really "good answers"?](http://meta.stackexchange.com/a/8259) – Bernhard Barker May 04 '14 at 23:35
  • It is in did good answer! Note that the question wasn't well defined (in purpose). The answer simply lead me to the right references. I am now adjusting the algorithm from [this paper](http://www-ihm.lri.fr/~mbl/ENS/CSCW/material/papers/Ellis-SIGMOD89.pdf) to my purposes instead of developing it from scratch. – Yony May 05 '14 at 13:02
  • @Dukeling OP's question was very broad, so I pointed him to the right direction by naming the algorithm type he was looking for and by giving examples of existing implementations (which have published detailed papers on their OT method). It would have been pointless to describe in detail OT algorithms here. Links may or may not be a good answer, don't make a dogma out of it. – Grapsus May 05 '14 at 13:38