<div dir="ltr">&gt;<span style="font-family:arial,sans-serif;font-size:13px">Looks like we need/should get rid of the &quot;pushNetworkURL&quot; on the SP Variant class and store a (SP installation) specific (simple)PushEndpoint.</span><div>
<span style="font-family:arial,sans-serif;font-size:13px">+1</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">&gt;</span><span style="font-size:13px;font-family:arial,sans-serif">I know that the SP spec names it </span><span style="font-size:13px;font-family:arial,sans-serif">pushEndpoint, but I feel it&#39;s better to name it &quot;simplePushEndpoint&quot;, to explicitly make sure that this is only for Installations of a SimplePushVariant.</span></div>
<div><span style="font-size:13px;font-family:arial,sans-serif">+1 That makes sense naming it simplePushEndpoint I think.</span></div><div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><span style="font-size:13px;font-family:arial,sans-serif">&gt;</span><span style="font-family:arial,sans-serif;font-size:13px">I wonder if, instead of the ENTIRE URL, we only could just store the &quot;hash&quot; (here &quot;d9b74644&quot;) and continue to use the pushNetworkURL on the SP Variant</span><span style="font-family:arial,sans-serif;font-size:13px"> </span></div>
<div>-1 for this with the reasons you outlined. I think it might be more flexible if the UnifiedPush Server does not have to deal with a &#39;pushNetworkURL&#39; for SimplePush. </div><div><br></div><div>/Dan</div><div><br>
</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 August 2013 10:51, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>here is an update for UnifiedPush (not yet working), that indicates a strategy:</div>
<div><br></div><div><a href="https://github.com/matzew/aerogear-unified-push-server/commit/dcf1c96d63702e4f34ad97794df6f31125755d6f" target="_blank">https://github.com/matzew/aerogear-unified-push-server/commit/dcf1c96d63702e4f34ad97794df6f31125755d6f</a><br>

</div><div><br></div><div><br></div><div>Looks like we need/should get rid of the &quot;pushnetwork URL&quot; on the SP Variant class and store a (SP installation) specific (simple)PushEndpoint. I know that the SP spec names it <span style="font-family:arial,sans-serif;font-size:13px">pushEndpoint, but I feel it&#39;s better to name it &quot;simplePushEndpoint&quot;, to explicitly make sure that this is only for Installations of a SimplePushVariant.</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"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">With that change we now store a lot of redundant metadata (for all the SP installations), which is most of the URL. Looking at the endpoint JSON object:</span></div>

<div><span style="font-family:arial,sans-serif;font-size:13px"><div>{</div><div>  &quot;messageType&quot;: &quot;register&quot;,</div><div>  &quot;channelID&quot;: &quot;d9b74644-4f97-46aa-b8fa-9393985cd6cd&quot;,</div><div>

  &quot;status&quot;: 200,</div><div>  &quot;pushEndpoint&quot;: &quot;<a href="http://pushserver.example.org/d9b74644" target="_blank">http://pushserver.example.org/d9b74644</a>&quot;</div><div>}</div><div><br></div><div>
I wonder if, instead of the ENTIRE URL, we only could just store the &quot;hash&quot; (here &quot;d9b74644&quot;) and continue to use the pushNetworkURL on the SP Variant (here: &quot;<a href="http://pushserver.example.org" target="_blank">http://pushserver.example.org</a>&quot;).</div>

<div><br></div><div>HOWEVER, I think this does not work when the URL of the &quot;request pushendpoint&quot; server (e.g.  &quot;<a href="http://pushserver-foo.something.org" target="_blank">pushserver-foo.something.org</a>&quot;) is different from the endpoint that receives the HTTP PUTs, from the AppServer/UnifiedPushServer.</div>

<div><br></div><div>SP connect:</div><div><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">SPClient = AeroGear.SimplePushClient({
    simplePushServerURL: &quot;<a href="http://foobar.server.com:7777/simplepush" target="_blank">http://foobar.server.com:7777/simplepush</a>&quot;,
    onConnect: spConnect,
    onClose: spClose
});</code></pre></div></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">received endpoint payload:</span></div><div>

<pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:13px;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;color:rgb(51,51,51)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;margin:0px;padding:0px;border:none;background-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">{
...
&quot;pushEndpoint&quot; : &quot;</code><span style="background-color:transparent;font-size:12px"><a href="http://something.different.server.com/blahBlahBlub" target="_blank">http://something.different.server.com/blahBlahBlub</a></span><span style="background-color:transparent;font-size:12px">&quot;
}</span></pre></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"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>

</span></div><div><font face="arial, sans-serif">-Matthias</font></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Thu, Aug 8, 2013 at 9:53 AM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi all!<div><br></div><div>Yesterday Kris pointed out that we are not following the SimplePush Spec[1] when it comes to the &#39;pushEndpoint&#39; that is returned when registering a channel. The spec shows that an absolute URL is returned but we are returning a relative URL. </div>


<div><br></div><div>For the AeroGear SimplePush Server this is being address by AGPUSH-261[2], and an instance that returns absolute URL is available at <a href="http://endpointurldns-dbevenius.rhcloud.com:8000/simplepush" target="_blank">http://endpointurldns-dbevenius.rhcloud.com:8000/simplepush</a>.</div>


<div><br></div><div>This change will affect the JavaScript client, the UnifiedPush Server, the Admin UI and possibly QE integration tests. </div><div><br></div><div>I won&#39;t go into all the changes for the components listed above as others can provide more accurate information about them if needed. Just wanted to give a heads up to all about this.</div>


<div><br></div><div>/Dan</div><div><br></div><div>[1] <a href="https://wiki.mozilla.org/WebAPI/SimplePush/Protocol#PushServer_-.3E_UserAgent_2" target="_blank">https://wiki.mozilla.org/WebAPI/SimplePush/Protocol#PushServer_-.3E_UserAgent_2</a><br>


</div><div>[2] <a href="https://issues.jboss.org/browse/AGPUSH-261" target="_blank">https://issues.jboss.org/browse/AGPUSH-261</a></div></div>
<br></div></div>_______________________________________________<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><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><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>
</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></div>