<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I like the topic of this thread so just wanted to add my 2 cents. As you know when I was with Errai we have implemented operation transforms and data sync and we have had a lot of discussions around these.</div><div><br></div><div>OT/EC is really nice, but it's a totally different use case then offline sync. The idea is that you only send your operations something like&nbsp;Insert[0, "x"] meaning on position 0 insert a x as you can see this will only work well if you have a very current version of the document that you are editing.</div><div><br></div><div>The sync from Errai is based on JPA and does merging based upon fields in the Entity on the server. By doing this the chance of conflicts is smaller but still there can be conflicts and those must be handled by a user. So we need to build a way to sent the different states back to the user.</div><div><br></div><div>We could also create something that does a peer to peer sync (eliminating the need for a central server) couchDB has a protocol that does that I think. Maybe we should think of use cases that we want to support like in Summer's thread and maybe we need more then one solution.</div><div><br></div><div>Cheers,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Erik Jan</div><div><br></div><div><div><div>On 3 Dec,2013, at 8:39 , Sebastien Blanc &lt;<a href="mailto:scm.blanc@gmail.com">scm.blanc@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Thanks Qmx for starting this thread.<div>Here the link to Summer's thread :&nbsp;</div><div><a href="http://lists.jboss.org/pipermail/aerogear-dev/2013-March/002090.html">http://lists.jboss.org/pipermail/aerogear-dev/2013-March/002090.html</a></div>
<div><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 3, 2013 at 3:21 AM, Douglas Campos <span dir="ltr">&lt;<a href="mailto:qmx@qmx.me" target="_blank">qmx@qmx.me</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
Howdy!<br>
<br>
Since we're starting the data-sync sprint, I'd like to bring some of the<br>
ideas that born from the research I've been doing.<br>
<br>
Note that those are only ideas that will be validated by a PoC or<br>
something like this (which I'm planning to continue working on after I'm<br>
back from PTO)<br>
<br>
I envision a layered approach:<br>
<br>
1) CouchDB Sync Protocol<br>
<br>
This is an approach that I really like a lot - it has lots of common<br>
things with git (keeping SHAs of the document's state and history of<br>
changes (until you compact your history)). The main advantage is that we<br>
can re-use all the nice algorithms we already have on the git lands to<br>
solve conflicts.<br>
<br>
2) OT/EC<br>
<br>
This is really nice &amp; well-known, but I think it would apply better for<br>
individual fields into a document.<br>
<br>
3) Crypto signatures<br>
<br>
We could have ed25519 signatures on the changes, making it potentially<br>
safer to decide who should win a change conflict based on rules that<br>
goes beyond simple merging strategies (business roles?)<br>
<br>
All this 3 layers could live on top of a very simple JSON protocol,<br>
which would allow us to evolve it gradually (I know this is prone to not<br>
be super efficient, but I don't want to optimize prematurely, and JSON<br>
compresses really well)<br>
<br>
Thoughts?<br>
<br>
Don't forget to read Summer's thread on this. (can someone reply with<br>
the link?)<br>
<span class=""><font color="#888888"><br>
--<br>
qmx</font></span><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div></div></div>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote></div><br></div></body></html>