Ok cool, thanks for this clarification. In my case the two properties (position: x,y) always change together, so then it is the best to use JSON and a single key.
Tobias On 21 Jan., 00:18, "pamela (Google Employee)" <[email protected]> wrote: > Hi Tobias - > > It is possible (in rare cases) that the resulting state is {"a": "1", > "b": "2"} or {"a": "2", "b": "1"}. The wave server treats changes to > separate keys as modifications of the document in two different > places. There is no guarantee that those 4 modifications would happen > in particular order. > > The only way to guarantee that two values always change together is to > attach them to the same key. For example: {ab: > gadgets.json.stringify({a: "1", b: "1"})} and {ab: > gadgets.json.stringify({a: 2, b: 2})}. The stored json object will > always be either {a: "1", b: "1"} or {a: "2", b: "2"} > > You should decide whether you need those two properties to always > change together. Alternatively, you can store the info in > per-participant keys, and decide yourself how to merge them in the > display. > > - pamela >
-- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
