Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijeTx-0006bS-Lu for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Dec 2019 07:19:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ijeTw-0007zM-7L for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Dec 2019 07:19:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijeTv-0007zF-Po for pgadmin-hackers@lists.postgresql.org; Tue, 24 Dec 2019 07:19:52 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ijeTr-0000YF-Bw for pgadmin-hackers@postgresql.org; Tue, 24 Dec 2019 07:19:51 +0000 Received: by mail-ed1-x543.google.com with SMTP id dc19so17242302edb.10 for ; Mon, 23 Dec 2019 23:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=XjRRTOgLekOExJxwd13JdbQ3ukPP5guzKtrgizTWZFY=; b=okLomRqY4jAV8RBSuSnQYX4xzKTLY+t5L4c7InU7HRjgeB3twDYZO/+M9EIuv4qoCL p51hCkJSHOOHb3Gxz0q68K9C7nnW+UhjDPpfB6GtydW+oMNq4FywUwwRqj72FZ85GPOc 4ZXtJWy+h9oLpZjdCvYzQg5flosNHSjb40Rpd3h05KqeVKyrkmNxOxtI5rjGEYShC8mt OEWItolc+Tz+IYqG9AXsjIFDAzlEuBpTffkHNM0fv1LGLJcSlNVwFoaJAZsXO8mXC+Q5 RnyvWkdOvm9zMjCVSaZgOwib+DyF/LkUuW8j3Lc40OS+WyJpCvp3MsWowCqDyaWCSvEm IHWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=XjRRTOgLekOExJxwd13JdbQ3ukPP5guzKtrgizTWZFY=; b=XtF90LeaFOXVzvt2vde4lfLS7SfzgLIjNF+8CAMImGbnldb8rwd8T9Ap3H8EaFNKdb giikxFXdzzpsoclmKeh0n7f7rDorIA/gBHK1yDl68oWvMKFjuJ1K1vGgCA6btN27d0vU +upxk8dP1E3Dz1KW+D1kokvu9cOG1XN9UaDA9PMlxRy2BObu4GGaBxsjhuRykNcqcxib kz1UvOTYyTCgNdm/nZ9cyKF2ctwu5hVGDYLSAj9Xhja90woP9PJ4erO8jkgN5O5WPyvP oog0/VmoMJ78UdtNnUszOblBXV1fe1Ly8ujsmzzkcvqt7o/39mOoGUqe5Hv0r2DCFuF7 xp4w== X-Gm-Message-State: APjAAAVoeaJyCUiTPwnKXI9OFX6PYM2Ri3mGAQFoIogv945C9Rev5li/ ERcHAWCiFzVJM/sMxz2n3vmXBDHWSCvKN5dStya7qEPjW46YLdJXN7NkG0jkHhApnJGVTu44O8P vlNNplZwOyND6QX1xC2UUUoTpmt+NMBCmWQVrymEpiafbb5JwbdVm1HR7EeXitqcvDvkTSduU+a ks032JNmfX1pUGU9SOxWVACtbEDhBQT+RHne1Qi19z/6joK15KNDgSIZvY X-Google-Smtp-Source: APXvYqztULV/P9643Qz9NHYC5IrgBQwGWGjuE3C0Ducmg09jB0UCbL9JJVQnmcFdMJad5lExY9DfJTiPJCCIRPTuf80= X-Received: by 2002:a17:906:74d1:: with SMTP id z17mr34880556ejl.99.1577171984913; Mon, 23 Dec 2019 23:19:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Tue, 24 Dec 2019 12:49:08 +0530 Message-ID: Subject: Re: [pgAdmin][RM5017] Use cheroot as default production server To: pgadmin-hackers Content-Type: multipart/mixed; boundary="000000000000e95de4059a6df76d" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000e95de4059a6df76d Content-Type: multipart/alternative; boundary="000000000000e95de2059a6df76b" --000000000000e95de2059a6df76b Content-Type: text/plain; charset="UTF-8" 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 < aditya.toshniwal@enterprisedb.com> 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 < > ashesh.vashi@enterprisedb.com> wrote: > >> Have you seen any improvements in performance? >> >> On Tue, 17 Dec 2019, 15:16 Aditya Toshniwal, < >> aditya.toshniwal@enterprisedb.com> 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" --000000000000e95de2059a6df76b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

<= font face=3D"verdana, sans-serif">One of the dependencies of cheroot -=C2= =A0jaraco.functools was released on 20t= h Dec (v 3.0.0) which=C2=A0removed the support below Python 3.6. So while i= nstalling cheroot (using pgAdmin wheel) on Python 3.5, it is failing. chero= ot works fine with its previous version of=C2=A0jaraco.functools=3D= =3D2.0.0. I've raised the issue to cheroot -=C2=A0https://github.com/cherryp= y/cheroot/issues/258.
Please note, installers work fine as = they are shipped with Python 3.7 venv. Ref -=C2=A0https://www= .postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2019-12-24/
Attached is the patch to pin=C2=A0jaraco.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 <aditya.toshniwal@enterprisedb.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
Hi Ashesh,
=

I had tried with -=C2=A0https://newrelic.co= m/=C2=A0API to check Flask app performance. To be=C2=A0honest, there wa= s not a great difference in the performance.=C2=A0
Per new relic, cheroot u= sed slightly less CPU, with more RPM and, with less response time.
Anyway, = flask is still not recommended=C2=A0and cheroot looks a good option as it i= s pure python and supports almost all OS.

On Fri, Dec 20, 2019 at 1:34= PM Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
Have you seen a= ny improvements in performance?=C2=A0

<= div dir=3D"ltr" class=3D"gmail_attr">On Tue, 17 Dec 2019, 15:16 Aditya Tosh= niwal, <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Attach= ed is the patch to use=C2=A0https://pypi.org/project/cheroot/=C2=A0instead of current f= lask dev server. cheroot is a stable production ready server. Plus, flask d= ev server is not recommended for production.
Code is changed to use cheroot= only when DEBUG is False, otherwise=C2=A0you the default flask server.

Kindly review.

--
Thanks = and Regards,
<= font size=3D"2" color=3D"#000000" face=3D"verdana, sans-serif">Aditya Toshn= iwal
S= r. Software Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about = Heat, Plant a TREE"


--
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer |=C2=A0Ent= erpriseDB India |=C2=A0Pune<= /span>
"Don't Complain about Heat, Plant a TREE"=


--
Thanks and Regards,Aditya Toshniwal
pgAdmin Hacker | Sr. S= oftware Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat= , Plant a TREE"
=
--000000000000e95de2059a6df76b-- --000000000000e95de4059a6df76d Content-Type: application/octet-stream; name="RM5017.part2.patch" Content-Disposition: attachment; filename="RM5017.part2.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k4jjgatw0 ZGlmZiAtLWdpdCBhL3JlcXVpcmVtZW50cy50eHQgYi9yZXF1aXJlbWVudHMudHh0CmluZGV4IGIy ZTAwZDYxMC4uNTQ4NTY1MmMzIDEwMDY0NAotLS0gYS9yZXF1aXJlbWVudHMudHh0CisrKyBiL3Jl cXVpcmVtZW50cy50eHQKQEAgLTE1LDYgKzE1LDcgQEAKICMgICAgICAgaWdub3JlZCB3aGVuIGJ1 aWxkaW5nIGEgUElQIFdoZWVsLgogIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCiBibGlua2VyPT0xLjQK K2phcmFjby5mdW5jdG9vbHM9PTIuMC4wCiBjaGVyb290PT04LjIuMQogRmxhc2s9PTEuMC4yCiBX ZXJremV1Zz49MC4xNS4wCg== --000000000000e95de4059a6df76d--