Re: [pgAdmin][RM5017] Use cheroot as default production server
Aditya Toshniwal <[email protected]> Fri, 27 Dec 2019 11:43:13 +0530
| Newsgroups | gmane.comp.db.postgresql.pgadmin.devel |
|---|---|
| Message-ID | <CAM9w-_=wXSDhhEWhdQntX2zH41JGozDwrcmFnhZjSb1Aq08POw@mail.gmail.com> |
--000000000000b1bd01059aa9654b Content-Type: text/plain; charset="UTF-8" Hi Hackers, Turned out my pip was of older version. Upgrading pip solved the jaraco.functools problem. pip downloaded the suitable version automatically. Kindly ignore the previous patch. On Tue, Dec 24, 2019 at 12:49 PM Aditya Toshniwal < [email protected]> wrote: > Hi Hackers, > > One of the dependencies of cheroot - jaraco.functools was released on > 20th Dec (v 3.0.0) which removed the support below Python 3.6. So while > installing cheroot (using pgAdmin wheel) on Python 3.5, it is failing. > cheroot works fine with its previous version of jaraco.functools==2.0.0. > I've raised the issue to cheroot - > https://github.com/cherrypy/cheroot/issues/258. > Please note, installers work fine as they are shipped with Python 3.7 > venv. Ref - > https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2019-12-24/ > Attached is the patch to pin jaraco.functools to 2.0.0 in requirements so > that it does not fail below Python 3.6. > > On Fri, Dec 20, 2019 at 6:21 PM Aditya Toshniwal < > [email protected]> wrote: > >> Hi Ashesh, >> >> I had tried with - https://newrelic.com/ API to check Flask app >> performance. To be honest, there was not a great difference in the >> performance. >> Per new relic, cheroot used slightly less CPU, with more RPM and, with >> less response time. >> Anyway, flask is still not recommended and cheroot looks a good option as >> it is pure python and supports almost all OS. >> >> On Fri, Dec 20, 2019 at 1:34 PM Ashesh Vashi < >> [email protected]> wrote: >> >>> Have you seen any improvements in performance? >>> >>> On Tue, 17 Dec 2019, 15:16 Aditya Toshniwal, < >>> [email protected]> wrote: >>> >>>> Hi Hackers, >>>> >>>> Attached is the patch to use https://pypi.org/project/cheroot/ instead >>>> of current flask dev server. cheroot is a stable production ready server. >>>> Plus, flask dev server is not recommended for production. >>>> Code is changed to use cheroot only when DEBUG is False, otherwise you >>>> the default flask server. >>>> >>>> Kindly review. >>>> >>>> -- >>>> Thanks and Regards, >>>> Aditya Toshniwal >>>> Sr. Software Engineer | EnterpriseDB India | Pune >>>> "Don't Complain about Heat, Plant a TREE" >>>> >>> >> >> -- >> Thanks and Regards, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >> "Don't Complain about Heat, Plant a TREE" >> > > > -- > Thanks and Regards, > Aditya Toshniwal > pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > -- Thanks and Regards, Aditya Toshniwal pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --000000000000b1bd01059aa9654b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,= sans-serif">Hi Hackers,</div><div class=3D"gmail_default" style=3D"font-fam= ily:verdana,sans-serif"><br></div><div class=3D"gmail_default" style=3D"fon= t-family:verdana,sans-serif">Turned out my pip was of older version. Upgrad= ing pip solved the jaraco.functools problem. pip downloaded the suitable ve= rsion automatically. Kindly ignore the previous patch.</div></div><br><div = class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 24,= 2019 at 12:49 PM Aditya Toshniwal <<a href=3D"mailto:aditya.toshniwal@e= nterprisedb.com">[email protected]</a>> wrote:<br></div>= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div cla= ss=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Hi Hackers,</= div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif"><= br></div><div class=3D"gmail_default"><font face=3D"verdana, sans-serif">On= e of the dependencies of cheroot -=C2=A0<span style=3D"color:rgb(36,41,46)"= >jaraco.functools was released on 20th Dec (v 3.0.0) which=C2=A0removed the= support below Python 3.6. So while installing cheroot (using pgAdmin wheel= ) on Python 3.5, it is failing. cheroot works fine with its previous versio= n of=C2=A0</span>jaraco.functools=3D=3D2.0.0. I've raised the issue to = cheroot -=C2=A0<a href=3D"https://github.com/cherrypy/cheroot/issues/258" t= arget=3D"_blank">https://github.com/cherrypy/cheroot/issues/258</a>.</font>= </div><div class=3D"gmail_default"><font face=3D"verdana, sans-serif">Pleas= e note, installers work fine as they are shipped with Python 3.7 venv. Ref = -=C2=A0</font><a href=3D"https://www.postgresql.org/ftp/pgadmin/pgadmin4/sn= apshots/2019-12-24/" target=3D"_blank">https://www.postgresql.org/ftp/pgadm= in/pgadmin4/snapshots/2019-12-24/</a></div><div class=3D"gmail_default"><fo= nt face=3D"verdana, sans-serif"><span style=3D"color:rgb(36,41,46)">Attache= d is the patch to pin=C2=A0</span><span style=3D"color:rgb(36,41,46)">jarac= o.functools to 2.0.0 in requirements so that it does not fail below Python = 3.6.</span></font></div></div><br><div class=3D"gmail_quote"><div dir=3D"lt= r" class=3D"gmail_attr">On Fri, Dec 20, 2019 at 6:21 PM Aditya Toshniwal &l= t;<a href=3D"mailto:[email protected]" target=3D"_blank">ad= [email protected]</a>> wrote:<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_defau= lt" style=3D"font-family:verdana,sans-serif">Hi Ashesh,<br></div><div class= =3D"gmail_default" style=3D"font-family:verdana,sans-serif"><br></div><div = class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">I had trie= d with -=C2=A0<a href=3D"https://newrelic.com/" style=3D"font-family:Arial,= Helvetica,sans-serif" target=3D"_blank">https://newrelic.com/</a>=C2=A0API = to check Flask app performance. To be=C2=A0honest, there was not a great di= fference in the performance.=C2=A0</div><div class=3D"gmail_default" style= =3D"font-family:verdana,sans-serif">Per new relic, cheroot used slightly le= ss CPU, with more RPM and, with less response time.</div><div class=3D"gmai= l_default" style=3D"font-family:verdana,sans-serif">Anyway, flask is still = not recommended=C2=A0and cheroot looks a good option as it is pure python a= nd supports almost all OS.</div></div><br><div class=3D"gmail_quote"><div d= ir=3D"ltr" class=3D"gmail_attr">On Fri, Dec 20, 2019 at 1:34 PM Ashesh Vash= i <<a href=3D"mailto:[email protected]" target=3D"_blank">as= [email protected]</a>> wrote:<br></div><blockquote class=3D"gm= ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,= 204,204);padding-left:1ex"><div dir=3D"auto">Have you seen any improvements= in performance?=C2=A0</div><br><div class=3D"gmail_quote"><div dir=3D"ltr"= class=3D"gmail_attr">On Tue, 17 Dec 2019, 15:16 Aditya Toshniwal, <<a h= ref=3D"mailto:[email protected]" target=3D"_blank">aditya.t= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmai= l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20= 4,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default" styl= e=3D"font-family:verdana,sans-serif">Hi Hackers,</div><div class=3D"gmail_d= efault" style=3D"font-family:verdana,sans-serif"><br></div><div class=3D"gm= ail_default" style=3D"font-family:verdana,sans-serif">Attached is the patch= to use=C2=A0<a href=3D"https://pypi.org/project/cheroot/" style=3D"font-fa= mily:Arial,Helvetica,sans-serif" rel=3D"noreferrer" target=3D"_blank">https= ://pypi.org/project/cheroot/</a>=C2=A0instead of current flask dev server. = cheroot is a stable production ready server. Plus, flask dev server is not = recommended for production.</div><div class=3D"gmail_default" style=3D"font= -family:verdana,sans-serif">Code is changed to use cheroot only when DEBUG = is False, otherwise=C2=A0you the default flask server.</div><div><br></div>= <div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">= Kindly review.</div><br></div>-- <br><div dir=3D"ltr"><div dir=3D"ltr"><div= ><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><font size=3D= "2" color=3D"#000000" face=3D"verdana, sans-serif">Thanks and Regards,</fon= t><div><span style=3D"background-color:rgb(255,255,255)"><font size=3D"2" c= olor=3D"#000000" face=3D"verdana, sans-serif">Aditya Toshniwal</font></span= ></div><div><font face=3D"verdana, sans-serif"><span style=3D"background-co= lor:rgb(255,255,255)"><font size=3D"2" color=3D"#000000">Sr. Software Engin= eer |=C2=A0EnterpriseDB India |=C2=A0</font></span><span style=3D"color:rgb= (0,0,0)">Pune</span></font></div><div><font color=3D"#38761d" face=3D"verda= na, sans-serif" size=3D"1">"Don't Complain about Heat, Plant a TRE= E"</font></div></div></div></div></div></div></div></div></div></div> </blockquote></div> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= ><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir= =3D"ltr"><div><div dir=3D"ltr"><font size=3D"2" color=3D"#000000" face=3D"v= erdana, sans-serif">Thanks and Regards,</font><div><span style=3D"backgroun= d-color:rgb(255,255,255)"><font size=3D"2" color=3D"#000000" face=3D"verdan= a, sans-serif">Aditya Toshniwal</font></span></div><div><font face=3D"verda= na, sans-serif"><span style=3D"background-color:rgb(255,255,255)"><font siz= e=3D"2" color=3D"#000000">pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0</font></span><span style=3D"color:rgb(0,0,0)">Pune<= /span></font></div><div><font color=3D"#38761d" face=3D"verdana, sans-serif= " size=3D"1">"Don't Complain about Heat, Plant a TREE"</font>= </div></div></div></div></div></div></div></div></div></div></div> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= ><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir= =3D"ltr"><div><div dir=3D"ltr"><font size=3D"2" color=3D"#000000" face=3D"v= erdana, sans-serif">Thanks and Regards,</font><div><span style=3D"backgroun= d-color:rgb(255,255,255)"><font size=3D"2" color=3D"#000000" face=3D"verdan= a, sans-serif">Aditya Toshniwal</font></span></div><div><font face=3D"verda= na, sans-serif"><span style=3D"background-color:rgb(255,255,255)"><font siz= e=3D"2" color=3D"#000000">pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0</font></span><span style=3D"color:rgb(0,0,0)">Pune<= /span></font></div><div><font color=3D"#38761d" face=3D"verdana, sans-serif= " size=3D"1">"Don't Complain about Heat, Plant a TREE"</font>= </div></div></div></div></div></div></div></div></div></div></div> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div= dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><font size=3D"2" c= olor=3D"#000000" face=3D"verdana, sans-serif">Thanks and Regards,</font><di= v><span style=3D"background-color:rgb(255,255,255)"><font size=3D"2" color= =3D"#000000" face=3D"verdana, sans-serif">Aditya Toshniwal</font></span></d= iv><div><font face=3D"verdana, sans-serif"><span style=3D"background-color:= rgb(255,255,255)"><font size=3D"2" color=3D"#000000">pgAdmin Hacker | Sr. S= oftware Engineer |=C2=A0EnterpriseDB India |=C2=A0</font></span><span style= =3D"color:rgb(0,0,0)">Pune</span></font></div><div><font color=3D"#38761d" = face=3D"verdana, sans-serif" size=3D"1">"Don't Complain about Heat= , Plant a TREE"</font></div></div></div></div></div></div></div></div>= </div></div></div> --000000000000b1bd01059aa9654b--