<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 11, 2013 at 9:53 AM, Matthias Wessendorf <span dir="ltr"><<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Tue, Jun 11, 2013 at 9:25 AM, Sebastien Blanc <span dir="ltr"><<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>></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"><div dir="ltr">Hi,<div>I start looking at the repo. I have some general questions and then more (not that much implementation detailed ;) ) specific proposals</div>
<div><br></div><div>* Is our final goal to propose an implementation that we really want the developers to use or is it more providing a reference implementation of the sender API and developer will most of the time implement their own ? </div>
</div></blockquote><div><br></div></div><div>The goal is, to give them a Java Utility to use to for sending. If they want, they can still do the HTTP by hand. Ideally we have this "client" for other platforms as well:</div>
<div>* Node.js, Ruby, PHP etc</div><div class="im"><div><br></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">
<div dir="ltr"><div>* How are we going to secure the API ? </div></div></blockquote><div><br></div></div><div>Once the endpoints are secured, we will leverage that on the client side (e.g. function to specifiy the "credentials")</div>
<div class="im">
<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"><div dir="ltr"><div><br></div><div>* The API looks like now "fire & forget", do we plan to change that ? </div>
</div></blockquote></div><div>It is fire and forget.</div><div class="im"><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">
<div dir="ltr"><div>I can imagine that people using the sender need to have some "feedback/return value/response" to manage their flows ?</div></div></blockquote><div><br></div></div><div>Well, we do not really have much control there. Apple, for instance, does also not really tell you: "I could not deliver the push message to Mr. XYZ". Similar is google. </div>
<div>They all have "feedback" service, that's more "here is a list of invalid device tokens". This info should NEVER be returned, from our Sender-Endpoint.</div><div><br></div><div>
Other cloud providers do similar: HTTP 200 + "Thanks we got your job, it is now being processed by our system"</div></div></div></div></blockquote><div><br></div><div style>I agree that we don't have control between "our" systems and Google's/Apple's networks. But, between our push server and our backend server, the chance is bigger that the dev has more control. The thing is that the sender api now "swallow" the http status, just making the http status available for the backend app using the sender API will be a nice benefit (there could be no connection between our pushee and our backend app for instance) ...</div>
<div style> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im"><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">
<div dir="ltr">
<div><br></div><div>* You say one will go away, why is that ? Do we want to lean toward a single implementation ?</div></div></blockquote><div><br></div></div><div>For Java, I do not see a reason in supporting two "client". I did start with AsyncHttpClient and RestEasy client. I was hoping to see odds/benefits in one....</div>
<div>Looking at the code, I think I do prefer using the RestEasy inside of our Java-Sender.... </div><div class="im"><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">
<div dir="ltr"><div> We could propose different ones (and in different language, like a vertx mod client)</div></div></blockquote><div><br></div></div><div>of course, but that's that's outside of the "java lib" we are talking about here. Surely, we can have a vertx-sender, node-sender etc </div>
<div class="im">
<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"><div dir="ltr"><div>
<br></div><div>So, now a bit more specific :</div><div>I've been forking your repo : <a href="https://github.com/sebastienblanc/ag-java-sender/tree/refactoring" target="_blank">https://github.com/sebastienblanc/ag-java-sender/tree/refactoring</a></div>
<div><br></div><div>To factor more code and make the sender API really unit testable (running without any server) I've moved a bit things and introduced a sort of Client interface that will implement really the http client we will use, this client is then injected in the sender interface.</div>
</div></blockquote><div><br></div></div><div>that is nice. The project is simple now, and was written while I was hacking the sender endpoints - that way I could avoid sending lot's of CURLs ;-) </div><div class="im">
<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"><div dir="ltr">
<div>With Arquillian should be easy to add real integration tests.</div></div></blockquote><div><br></div></div><div>sounds good</div><div><div class="h5"><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">
<div dir="ltr"><div><br></div><div class="gmail_extra">Let's discuss !</div><div class="gmail_extra">Sebi</div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div>
On Mon, Jun 3, 2013 at 9:00 PM, Matthias Wessendorf <span dir="ltr"><<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>></span> wrote:<br></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">
<div><div>
<div dir="ltr">Hello,<div><br></div><div>a FIRST version of the Java Sender API is ready:</div><div><a href="https://github.com/matzew/ag-java-sender" target="_blank">https://github.com/matzew/ag-java-sender</a></div><div>
<br></div><div>Two implementations, based on different Java HTTP clients:</div>
<div>* RestEasy:</div><div><a href="https://github.com/matzew/ag-java-sender/blob/master/src/main/java/org/aerogear/unifiedpush/resteasy/RestEasyJavaSender.java" target="_blank">https://github.com/matzew/ag-java-sender/blob/master/src/main/java/org/aerogear/unifiedpush/resteasy/RestEasyJavaSender.java</a></div>
<div>* AsyncHttpClient:</div><div><a href="https://github.com/matzew/ag-java-sender/blob/master/src/main/java/org/aerogear/unifiedpush/async/AsyncJavaSender.java" target="_blank">https://github.com/matzew/ag-java-sender/blob/master/src/main/java/org/aerogear/unifiedpush/async/AsyncJavaSender.java</a><br>
</div><div><br></div><div>One will go away, time will tell... not important now...<br></div><div><br></div><div>Tests:</div><div><a href="https://github.com/matzew/ag-java-sender/tree/master/src/test/java/org/aerogear/unifiedpush" target="_blank">https://github.com/matzew/ag-java-sender/tree/master/src/test/java/org/aerogear/unifiedpush</a><br>
</div><div><br></div><div><br></div><div>More functionality (e.g. selective send for deviceType, MobileVariant) will follow, hand in hand with the matching endpoints</div><span><font color="#888888"><div><br></div>
<div>
<br></div><div>-Matthias</div><div><br></div><div><br></div><div><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></font></span></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><br></blockquote></div><br></div></div>
<br>_______________________________________________<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></div></div><div><div class="h5"><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></div></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>