<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks Matthias, the response and agility of Aerogear team has been phenomenal so far.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] <b>On Behalf Of </b>Matthias Wessendorf<br><b>Sent:</b> Monday, June 02, 2014 11:10 PM<br><b>To:</b> vivek.pandey@pinelabs.com<br><b>Cc:</b> AeroGear Developer Mailing List<br><b>Subject:</b> Re: [aerogear-dev] UPS Production worthiness<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hello Vivek!<br><br>On Monday, May 26, 2014, Vivek Pandey &lt;<a href="mailto:vivek.pandey@pinelabs.com">vivek.pandey@pinelabs.com</a>&gt; wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Matthias,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It is good to know that activity in java-apns is picking up and also that you are looking at pushy.</span><o:p></o:p></p></div></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>We just released 1.0.0.Beta1 of java-apns to maven central: <a href="https://t.co/2uBjtdiGIS">https://t.co/2uBjtdiGIS</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>It will be integrated to our server pretty soon!<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>-Matthias<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I did a few tests which added installations to UPS with a concurrency of 4-8 threads. I was using Postgres 9.3 and UPS 0.10.3 war</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I noticed that response slowed down considerably after some time with high CPU usage and continued to get worse. After doing some profiling, I found that bulk of CPU cycles are being taken by org.postgresql.core.VisibleBufferedInputStream.readMore. The entire thread stack is attached. Also postgres continuously flagged </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>select installati0_.variantID as variant10_0_0_, installati0_.id as id1_3_0_, installati0_.id as id1_3_1_, installati0_.alias as alias2_3_1_, installati0_.deviceToken as deviceTo3_3_1_, installati0_.deviceType as deviceTy4_3_1_, installati0_.enabled as enabled5_3_1_, installati0_.operatingSystem as operatin6_3_1_, installati0_.osVersion as osVersio7_3_1_, installati0_.platform as platform8_3_1_, installati0_.simplePushEndpoint as simplePu9_3_1_ from InstallationImpl installati0_ where installati0_.variantID=$1</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>as the slow query. I am pretty sure that eager collection AbstractVariant.installations is the root cause of the problem. </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Please let me know if you need any more information.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Vivek</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="javascript:_e(%7B%7D,'cvml','mwessendorf@gmail.com');" target="_blank">mwessendorf@gmail.com</a> [mailto:<a href="javascript:_e(%7B%7D,'cvml','mwessendorf@gmail.com');" target="_blank">mwessendorf@gmail.com</a>] <b>On Behalf Of </b>Matthias Wessendorf<br><b>Sent:</b> Wednesday, May 21, 2014 5:55 PM<br><b>To:</b> <a href="javascript:_e(%7B%7D,'cvml','vivek.pandey@pinelabs.com');" target="_blank">vivek.pandey@pinelabs.com</a>; AeroGear Developer Mailing List<br><b>Subject:</b> Re: [aerogear-dev] UPS Production worthiness</span><o:p></o:p></p><p>&nbsp;<o:p></o:p></p><div><p>Hello&nbsp;Vivek!<o:p></o:p></p><div><p style='margin-bottom:12.0pt'>&nbsp;<o:p></o:p></p><div><p>On Wed, May 21, 2014 at 2:07 PM, Vivek Pandey &lt;<a href="mailto:vivek.pandey@pinelabs.com">vivek.pandey@pinelabs.com</a>&gt; wrote:<o:p></o:p></p><div><div><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Jay,</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your reply.</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>While we have not faced any issues in using UPS in our limited testing, I often see info stacktraces in ups logs</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>2014-05-16 10:19:20,032 INFO&nbsp; [com.notnoop.apns.internal.ApnsConnectionImpl] (Thread-118) Exception while waiting for error code: java.net.SocketException: Socket closed</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.net.SocketInputStream.socketRead0(Native Method) [rt.jar:1.7.0_51]</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.net.SocketInputStream.read(SocketInputStream.java:152) [rt.jar:1.7.0_51]</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.net.SocketInputStream.read(SocketInputStream.java:122) [rt.jar:1.7.0_51]</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ……………</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.notnoop.apns.internal.ApnsConnectionImpl$1MonitoringThread.run(ApnsConnectionImpl.java:114) [apns-0.2.3.jar:]</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p><span style='font-size:8.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>These stacktraces coupled with low dev activity of noop/java-apns project are disconcerting to me.</span><o:p></o:p></p></div></div><div><p>&nbsp;<o:p></o:p></p></div><div><p>the stack-trace is no harm - it's only happening w/ doing a monitoring of the thread (that's what we currently do, when setting up ApnsService - I thought about explicitly disable that)<o:p></o:p></p></div><div><p>&nbsp;<o:p></o:p></p></div><div><p>The activity of the underlying java-apns is very low, yes! However @froh42 is getting back:<o:p></o:p></p></div><div><p><a href="https://github.com/notnoop/java-apns/commits/master" target="_blank">https://github.com/notnoop/java-apns/commits/master</a><o:p></o:p></p></div><div><p>&nbsp;<o:p></o:p></p></div><div><p>There will be a new release in the near future; @froh42 asked me if I could help with pushing the bits to maven central<o:p></o:p></p></div><div><p>&nbsp;<o:p></o:p></p></div><div><p>&nbsp;<o:p></o:p></p></div><div><p>That said, I recently started looking at pushy:<o:p></o:p></p></div><div><p><a href="https://github.com/relayrides/pushy" target="_blank">https://github.com/relayrides/pushy</a><o:p></o:p></p></div><div><p>&nbsp;<o:p></o:p></p></div><div><p>I also sent a PR that would allow us to feed pushy w/ our certificate from the database:<o:p></o:p></p></div><div><p><a href="https://github.com/relayrides/pushy/pull/87" target="_blank">https://github.com/relayrides/pushy/pull/87</a><o:p></o:p></p></div><div><p>&nbsp;<o:p></o:p></p></div></div></div></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=2 width="100%" align=center></div><p class=MsoNormal>This message may contain privileged and confidential information and is solely for the use of intended recipient. The views expressed in this email are those of the sender and not of Pine Labs. The recipient should check this email and attachments for the presence of viruses / malwares etc. Pine Labs accepts no liability for any damage caused by any virus transmitted by this email. Pine Labs may monitor and record all emails.<o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=2 width="100%" align=center></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></blockquote><p class=MsoNormal><br><br>-- <br>Sent from Gmail Mobile<o:p></o:p></p></div>
<br><html><hr>This message may contain privileged and confidential information and is solely for the use of intended recipient. The views expressed in this email are those of the sender and not of Pine Labs. The recipient should check this email and attachments for the presence of viruses / malwares etc. Pine Labs accepts no liability for any damage caused by any virus transmitted by this email. Pine Labs may monitor and record all emails.<hr></html>

<br></body></html>