<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 3:37 PM, Summers Pittman <span dir="ltr">&lt;<a href="mailto:supittma@redhat.com" target="_blank">supittma@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 text="#000000" bgcolor="#FFFFFF">
    <div>I&#39;ll skip the questions DanBev
      Answered.<div><div class="h5"><br>
      <br>
      On 10/14/2014 03:46 AM, Matthias Wessendorf wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, Oct 14, 2014 at 12:12 AM,
            Summers Pittman <span dir="ltr">&lt;<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</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">TL;DR;
              Watch this repo over the next few days :<br>
              <br>
              <a href="https://github.com/secondsun/aerogear-sync-server/tree/xmpp-diff-sync" target="_blank">https://github.com/secondsun/aerogear-sync-server/tree/xmpp-diff-sync</a><br>
              <br>
              Currently I am researching integrating the sync client
              technology that<br>
              DanBev, LolQuist et al have been working on into Android
              all proper<br>
              like.  Danbev wrote a POC demo a while ago* which uses the
              Java<br>
              websocket client. </blockquote>
            <div><br>
            </div>
            <div>what java client was used?</div>
          </div>
        </div>
      </div>
    </blockquote>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div> </div>
            <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">
              This seems to work &quot;OK&quot; but there is a lot of work<br>
              getting websockets working right on Android. </blockquote>
            <div><br>
            </div>
            <div>+1 </div>
            <div> </div>
            <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">
              However, Google has a two<br>
              way messaging protocol built into Google Play Services on
              top of GCM.<br>
              This is the technology I am trying to introduce to the
              sync systems in<br>
              this branch.<br>
              <br>
              This branch includes a fork of the server library and a
              fork of the<br>
              client library which interact with GCM on the client and
              XMPP on the<br>
              server side.  Right now it compiles and not much else. 
              However, because<br>
              the server is decoupled from the connection handling,
              adding in the<br>
              correct hooks has been rather simple.  There are going to
              be some issues<br>
              to hammer out once this gets past &quot;compiling&quot; and makes it
              into &quot;demoable&quot;.<br>
              <br>
              First, the server does not receive implicit
              connect/disconnect messages<br>
              from Google per device.  Google does send Ack/Nack
              messages however so<br>
              with some bookkeeping connections/shadows/etc can be
              properly<br>
              maintained.    There is a similar mechanism on the client
              side; however,<br>
              we may need to expand the sync protocol to include some
              kind of heartbeat.<br>
              <br>
              Second, the sync server isn&#39;t multitenant.  This means
              that until we<br>
              figure out how to merge, things listening to WebSockets
              don&#39;t hear<br>
              things listening to XMPP or see updates from one to the
              other.<br>
            </blockquote>
            <div><br>
            </div>
            <div>on our sync-server, can&#39;t have have different
              &quot;endpoints&quot; (e.g. xmpp, websocket),</div>
            <div>that all connect to its heart, the <span style="font-family:arial,sans-serif;font-size:13px">Netty-based
                DiffSync engine?</span></div>
            <div><br>
            </div>
            <div> </div>
            <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"><br>
              Finally, Google Play Services is not FOSS by any stretch
              of the<br>
              imagination.  However, having a single connection managed
              by the OS is<br>
              great for usability, speed of development, battery life,
              etc so I feel<br>
              like this is more getting mileage out of the chunk of my
              soul I tossed<br>
              in the black Googley shredder for UPS and less of a deal
              breaker.<br>
            </blockquote>
            <div><br>
            </div>
            <div>not sure I follow here</div>
          </div>
        </div>
      </div>
    </blockquote></div></div>
    Google Play Services is proprietary software.  I would prefer to
    keep as much stuff open source as possible. </div></blockquote><div><br></div><div>ah, ok </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"> Since we have already
    agreed that leaning on GPS is OK, I don&#39;t feel as bad about using it
    again.</div></blockquote><div><br></div><div>yeah, I agree it&#39;s not a bad thing to leverage that</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> </div>
            <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"><br>
              As I&#39;ve said right now, today, this code is work in
              progress.  Soon it<br>
              will be proof of concept and we can discuss how to work
              around these<br>
              issues and merge the ideas back into mainline.<br>
            </blockquote>
            <div><br>
            </div>
            <div>looking forward to that. </div>
            <div> </div>
            <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"><br>
              <br>
              --<br>
              Summers Pittman<br>
              &gt;&gt;Phone:404 941 4698<br>
              &gt;&gt;Java is my crack.<br>
              <br>
              PS: WebSocket&#39;s biggest problems are maintaining
              connections and<br>
              performing message redelivery in a sporatic connection
              scenario. This is<br>
              one of those things which is a lot of work to get right
              both on our end<br>
              as service providers and on the developer&#39;s end as
              consumers.<br>
              Additionally, Android L is going to include a lot more end
              user<br>
              configurability which will affect when/how messages are
              delivered. </blockquote>
            <div><br>
            </div>
            <div>any link to share?</div>
          </div>
        </div>
      </div>
    </blockquote>
</span><a href="http://www.androidcentral.com/android-l-preview-battery-and-power-management" target="_blank">http://www.androidcentral.com/android-l-preview-battery-and-power-management</a><br>
    <br>
    Specifically I had the Job Scheduler APIs in mind.<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div> </div>
            <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">
              To<br>
              do WebSockets right we will have to respect those settings
              as well.  It<br>
              is my assumption (we all know what that means) that Google
              Play Services<br>
              will correctly enforce data/power settings out of the box
              as well as<br>
              correctly maintain messaging connections and delivery.<br>
            </blockquote>
            <div><br>
            </div>
            <div>instead of having our Android lib do a WS connection
              (including all the required work for maintaining etc), we
              could leverage the XMPP from GCM.</div>
            <div>That&#39;s the prefered route you are suggesting, right ? <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote></span>
    Yes.  XMPP is only exposed on the server side.  On the client side
    it looks like Push notifications and calling a send method on the
    gcm client.</div></blockquote><div><br></div><div>sounds good. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div><br>
            </div>
            <div>ANDROID   &lt;----&gt; GCM &lt;------&gt; Sync-Server</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>This would allow us, to do more than we do atm on
              &quot;pure&quot; push notifications, via GCM. In this scenario we
              can do a two way communication:<br>
            </div>
            <div>Android client can send data to Sync-Server (via GCM),
              and receive &quot;diff&quot; from the server, via GCM.</div>
          </div>
        </div>
      </div>
    </blockquote></span>
    Yes.</div></blockquote><div><br></div><div>sounds good!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><br>
            </div>
            <div><br>
            </div>
            <div>-Matthias</div>
            <div> </div>
            <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">_______________________________________________<br>
              aerogear-dev mailing list<br>
              <a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          Matthias Wessendorf <br>
          <br>
          blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
          sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
          twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
aerogear-dev mailing list
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
    </blockquote>
    <br>
    <br>
    </span><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
Summers Pittman
&gt;&gt;Phone:404 941 4698
&gt;&gt;Java is my crack.
</pre>
  </font></span></div>

<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><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>