<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 1:12 PM, 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"><p style="line-height:22.727272033691406px;margin-right:0px;font-size:15.454545021057129px;margin-left:0px;margin-bottom:15px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important">

Hello,</p><p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">for [<a href="https://issues.jboss.org/browse/AGPUSH-110" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none" target="_blank">1</a>] I&#39;d like to propose a slight change to the message format spec ([<a href="http://staging.aerogear.org/docs/specs/aerogear-push-messages/" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none" target="_blank">2</a>]):</p>

<p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">The introduction of a new field, called &#39;<b>ttl</b>&#39;, which contains a value (in seconds). This value will be translated (by the UnifiedPush Server) into the specific details of the supported platforms (GCM and APNs; NOTE: SimplePush standard does not this support this atm)...</p>

<p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">An example for a message which expires in one hour:</p><pre style="background-color:rgb(248,248,248);border-top-left-radius:3px;margin-bottom:15px;padding:6px 10px;line-height:19px;border-top-right-radius:3px;font-size:13px;overflow:auto;border-bottom-right-radius:3px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;margin-top:15px;border:1px solid rgb(221,221,221);border-bottom-left-radius:3px">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:normal;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">curl -3 -u &quot;{PushApplicationID}:{MasterSecret}&quot;
   -v -H &quot;Accept: application/json&quot; -H &quot;Content-type: application/json&quot; 
   -X POST
   -d &#39;{
       &quot;alias&quot; : [&quot;<a href="mailto:user@account.com" target="_blank">user@account.com</a>&quot;],
       &quot;ttl&quot; : 3600, // expires in one hour
       &quot;message&quot;: {
         &quot;alert&quot;:&quot;URGENT CALL!!!!&quot;,
         &quot;sound&quot;:&quot;default&quot;
       }
     }&#39;

https://SERVER:PORT/CONTEXT/rest/sender
</code></pre><p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">On our fluent client APIs (NodeJS and Java), I&#39;d propose we add a <code style="font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:normal;margin:0px 2px;padding:0px 5px;border:1px solid rgb(221,221,221);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;white-space:nowrap">timeToLive(secondsInInt)</code> method to the APIs;</p>

<p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">Any thoughts ?</p></div></blockquote><div>Sounds good ! For the client I think even the &#39;ttl&#39; shortcut is acecptable (with good javadoc).   </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">

-Matthias</p><p style="line-height:22.727272033691406px;font-size:15.454545021057129px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">[1] <a href="https://issues.jboss.org/browse/AGPUSH-110" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none" target="_blank">https://issues.jboss.org/browse/AGPUSH-110</a> <br>

[2] <a href="http://staging.aerogear.org/docs/specs/aerogear-push-messages/" rel="noreferrer" style="color:rgb(65,131,196);text-decoration:none" target="_blank">http://staging.aerogear.org/docs/specs/aerogear-push-messages/</a></p>
<span class="HOEnZb"><font color="#888888"><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></div>