<div dir="ltr">First, I appreciate the discussion in this thread as this is all new to me.<br><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">&gt; What use cases should we support first?</span><br>

</div><div><span style="font-family:arial,sans-serif;font-size:13px">I&#39;d be for looking into the document use case first, and hold off with the transactional/Operational Transformation one for now. This mainly because is seems to be a lot simpler. </span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">qmx suggested using something similar to CouchDB. CouchDB uses a revision field for each document to handle/detect conflicts. </span></div><div><span style="font-family:arial,sans-serif">The following is a concrete example of how this works with CouchDB:</span><br>
</div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Create a database:</font></div><div><font face="arial, sans-serif">curl -X PUT <a href="http://127.0.0.1:5984/agsync" target="_blank">http://127.0.0.1:5984/agsync</a></font></div>

<div><font face="arial, sans-serif">{&quot;ok&quot;:true}</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Get a uuid:</font></div><div><font face="arial, sans-serif">curl -X GET <a href="http://127.0.0.1:5984/_uuids" target="_blank">http://127.0.0.1:5984/_uuids</a></font></div>

<div><font face="arial, sans-serif">{&quot;uuids&quot;:[&quot;f11075199bcea80849204660d7000d53&quot;]}</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Create a car object(document) using the above uuid:</font></div>

<div><font face="arial, sans-serif">curl -X PUT <a href="http://127.0.0.1:5984/agsync/f11075199bcea80849204660d7000d53" target="_blank">http://127.0.0.1:5984/agsync/f11075199bcea80849204660d7000d53</a> -d &#39;{&quot;car&quot;: {&quot;make&quot;:&quot;Toyota&quot;, &quot;color&quot;:&quot;red&quot;}}&#39;</font></div>

<div><font face="arial, sans-serif">{&quot;ok&quot;:true,&quot;id&quot;:&quot;f11075199bcea80849204660d7000d53&quot;,&quot;rev&quot;:&quot;1-dffbd1dbd1b9ecbffc1b02a34cbaea0b&quot;}</font></div><div><font face="arial, sans-serif"><br>

</font></div><div><div><font face="arial, sans-serif">Notice that the server returned a new document revision.</font></div></div><div><span style="font-family:arial,sans-serif"><br></span></div><div><span style="font-family:arial,sans-serif">Now clientA updates the car object, notice that we are specifying the document revision:</span><br>
</div><div><font face="arial, sans-serif">curl -X PUT <a href="http://127.0.0.1:5984/agsync/f11075199bcea80849204660d7000d53" target="_blank">http://127.0.0.1:5984/agsync/f11075199bcea80849204660d7000d53</a> -d &#39;{&quot;_rev&quot;:&quot;1-dffbd1dbd1b9ecbffc1b02a34cbaea0b&quot;, &quot;car&quot;: {&quot;make&quot;:&quot;Toyota&quot;,&quot;color&quot;:&quot;blue&quot;}}&#39;</font></div>

<div><font face="arial, sans-serif">{&quot;ok&quot;:true,&quot;id&quot;:&quot;f11075199bcea80849204660d7000d53&quot;,&quot;rev&quot;:&quot;2-588a9da2e252e9a3d2fc0634610a0c25&quot;}</font></div><div><font face="arial, sans-serif"><br>

</font></div><div><font face="arial, sans-serif">Also, notice how the server returned a new document revision.</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Now, clientB still has the old revision and tries to update the car object:</font></div>

<div><div> curl -v -X PUT <a href="http://127.0.0.1:5984/agsync/f11075199bcea80849204660d7000d53">http://127.0.0.1:5984/agsync/f11075199bcea80849204660d7000d53</a> -d &#39;{&quot;_rev&quot;:&quot;1-dffbd1dbd1b9ecbffc1b02a34cbaea0b&quot;, &quot;car&quot;: {&quot;make&quot;:&quot;Toyota&quot;,&quot;color&quot;:&quot;yellow&quot;}}&#39;</div>
<div>&lt; HTTP/1.1 409 Conflict<br></div><div>{&quot;error&quot;:&quot;conflict&quot;,&quot;reason&quot;:&quot;Document update conflict.&quot;}<br></div><div>This conflict would the have to be handled by the client. <span style="font-family:arial,sans-serif">Could we start out with something similar and as simple as this and evolve it? </span><span style="font-size:13px;font-family:arial,sans-serif"> </span></div>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 11 December 2013 08:30, Erik Jan de Wit <span dir="ltr">&lt;<a href="mailto:edewit@redhat.com" target="_blank">edewit@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">&gt;<br>
&gt; Just because I want to start with a simple use case doesn&#39;t mean you can<br>
&gt; dismiss the use case.<br>
&gt;<br>
<br>
<br>
</div>I don’t want to dismiss anything just wanted to know what you think about my idea to combine a pipe and store to create a pipe that continues to work when the user goes offline. Obviously you don’t feel my idea makes any sense and I think that you sync isn’t a super powerful feature to have (there are to many pre conditions in my opinion), but we could have it, not dismissing it.<br>

<br>
What do others think about this discussion? What use cases should we support first? Can you think of other ways/things to sync?<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>