Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez4wc-0002ZL-1Q for pgadmin-hackers@arkaria.postgresql.org; Thu, 22 Mar 2018 18:28:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ez4wY-0002Il-R0 for pgadmin-hackers@arkaria.postgresql.org; Thu, 22 Mar 2018 18:28:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez4wY-0002Ib-8c for pgadmin-hackers@lists.postgresql.org; Thu, 22 Mar 2018 18:28:06 +0000 Received: from mail-io0-x244.google.com ([2607:f8b0:4001:c06::244]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ez4wS-0003DC-5s for pgadmin-hackers@postgresql.org; Thu, 22 Mar 2018 18:28:04 +0000 Received: by mail-io0-x244.google.com with SMTP id m83so12122179ioi.8 for ; Thu, 22 Mar 2018 11:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p4LEgHD7MMu+4Rg7Nnkqq1s4XDEjlKwcxdqBNxag/18=; b=onz53nmLrML3famEBCzfXND5yH+pLokegYaJVHh8rM5KPgd67mLvDD3sod/oAPt4Q0 VGFNcC8L+1DgPhneCNJJw4Sp7Q2mt3TkC709VxnouRb2SxBwxGXST270xwgBu2q3d3M7 5S1N4un5fO6JwqISF2Gbhrc601+YgnszgU5665FjoHLj1P3b8icm1JU1m7aFkefr6tip KwQgLb9WxUqYqulclKxmBZgnPp/LQia957w9pXN8msxl/PHOVex5r/X66A8UQBK0uAWV wXQUJDK8cD2ePVqmPyonwzt6Ipq6T3ryIV+UJpzQLQPjCv9BUkJf06rx0JK0NhSkWjVD LOrg== 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:cc; bh=p4LEgHD7MMu+4Rg7Nnkqq1s4XDEjlKwcxdqBNxag/18=; b=FsZGLHQVrBOto/eEWF+3J4YOcxOHNWR2/o+TClH2z+sWIYJMt3nZKnPynjYyqsXg/U eHE6EOD1Wl0LyYoxETWax6SjvCrjVVv5wdrVV60np1lgSqHeg/acxNtyLx4BGyRVdGGG 1QkCHTK1nrqNutH4AGYSgna8ZufAbbcsaXlEDdCd/FUkDhqvwi+NFMy3m9+gf5L7gNFx mcx+OL1wadXYHi8y3XW1c8J+zjN2UBFa61G0lB4Ns8X1z2q+9DaDVoSFaSfhzfYKQngY fbZ2QzNjjP9LuvTYhO7WhU7dhX7xtlhHwT1+a0jQQsxPsmgeAMaprlnnX4BXEn6+T4rL s5eA== X-Gm-Message-State: AElRT7E9JAs/SGEgwIDw90Nh4/CFCWowRnf3tozItLY1YLZbmTdIKyoI Kc2b/AW9lScJWdahI0gmXc3dl2UoSIK67rID4T9MxA== X-Google-Smtp-Source: AG47ELsXBelu7jRMcOHyDSZQC07PQn0NblLn0C7krJlSdTRUO1X/MocEO68QTFNTTQQ12Nc85QFf0B6wvxSMth7U/eg= X-Received: by 10.107.55.9 with SMTP id e9mr27426368ioa.69.1521743278287; Thu, 22 Mar 2018 11:27:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Thu, 22 Mar 2018 18:27:47 +0000 Message-ID: Subject: Re: Showstopper desktop runtime issue To: Dave Page Cc: Magnus Hagander , Murtuza Zabuawala , pgadmin-hackers , Akshay Joshi , Neel Patel , Ashesh Vashi , Robert Eckhardt Content-Type: multipart/alternative; boundary="001a114ab7728af0cc056804779d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a114ab7728af0cc056804779d Content-Type: text/plain; charset="UTF-8" Hello Hackers In the PoC we did with Electron last month this was the point where we stopped What did we accomplish: - Use Electron as a runtime and packaging solution for the application - Support opening new windows when the preferences ask for them - Make the application generally work - Use Chrome as a default browser for the application - Building scripts for all platforms using `yarn`, please review Readme - The packaged Python version is 3.6 to Mac and Linux, and 3.4 to Windows - In our point of view it is a simpler way to generate the installers Work in progress: - No random port for the server, so you can only start 1 instance per machine - Tab support, there is no native support for tabs in Electron. It is possible to do that, and eventually you will see a option in the menu to create a new tab, but for this PoC we decided to disable the creation of tabs. Tabs need to be implemented using HTML and cannot be ripped of from the current window, like in Chrome - Did not test in CentOS, but tested in Ubuntu and it is working (We tried but the electron required GLIBC 2.25 that was not on the version of CentOS that we had) - In Linux despite the fact that we close the window, the application is still running and need to be killed by hand - We didn't test Debugger opening in new window - Loading screen has no reference to pgAdmin - No logging file for the runtime - Windows we are using python 3.4 and using prior version of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the correct one, this is because we couldn't find a precompile version of psycopg2) - This is just a spike and the code looks pretty messy. This need to be changed in order to make it more readable and have some tests around it - Murtuza and Fahar were not able to run the application in Windows - Khushboo was not able to run Ubuntu version Given this was the status at the time, we need to pick and choose what we really want to implement right out of the box and what could be postponed. In order to generate Windows build and ensure that the Linux build is working we need so help. If we could have access to the machines that you use to build pgAdmin or access to the venv folder that is generated in these machines we could try to create a build from that. The changes we produced still applies cleanly on master and can be found in: https://github.com/greenplum-db/pgadmin4/tree/electron-over-master Thanks Victoria & Joao On Thu, Mar 22, 2018 at 12:58 PM Dave Page wrote: > On Thu, Mar 22, 2018 at 4:28 PM, Dave Page wrote: > >> >> 2) This option is not very appealing to me, because we would be pilling >>>> code into the QT portion of the application, that I hope we remove in the >>>> future, that currently is untested to solve a problem caused by a Window >>>> Manager...... >>>> I would be more in favor of creating a Application Indicator that would >>>> support 2 actions, Kill running pgAdmins and launch the browser to access >>>> them. There is a lot of interesting websites that talk about this, and how >>>> to develop. I had to download one to have a docker indicator..... But as I >>>> said in a previous thread, I believe that this should be a 3rd party >>>> application and not a first class citizen on pgAdmin, as the majority of >>>> the ones that I found are. >>>> >>> >>> I can't comment on the specific ways to sort it out, but I think >>> *basing* things in option 2 is by far the best option. If it's just an >>> additional add-on that can be made a dependency of the packages it's not a >>> huge problem (provided this add-on is available on the major platforms like >>> rhel, ubuntu, debian of course) >>> >> >> It would just be a modified version of what we have. Instead of having an >> icon in the system tray, we'd probably have multiple Start Menu icons to >> replace the tray icon menu. They would have to signal a running instance to >> do something, or become a new instance and then do the something if nothing >> is running already. >> > > Of course, another option here might be to figure out that we're running > under Gnome/GTK at runtime, and if so, create an indicator icon and menu > instead of the tray icon. That is, apparently, what Skype and other similar > apps do now. The indicator icons go on the right of the top menu bar (kinda > like where tray icons go on macOS). > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a114ab7728af0cc056804779d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Hackers

In the PoC we did with El= ectron last month this was the point where we stopped

<= div>
What did we accomplish:
=C2=A0- Use=C2=A0Electron=C2=A0as a runtime and packaging solution for the appl= ication
=C2=A0- Support opening new= windows when the preferences ask for them
=C2=A0- Make the application generally work
=C2=A0- Use Chrome as a default browser for the applicatio= n
=C2=A0- Building scripts for all = platforms using `yarn`, please review Readme
=C2=A0- The packaged Python version is 3.6 to Mac and Linux, and = 3.4 to Windows
=C2=A0- In our point= of view it is a simpler way to generate the installers

Work in p= rogress:
=C2=A0- No random port for= the server, so you can only start 1 instance per machine
=C2=A0- Tab support, there is no native support fo= r tabs in=C2=A0Electron. It is p= ossible to do that, and eventually you will see a option in the menu to cre= ate a new tab, but for this PoC we decided to disable the creation of tabs.= Tabs need to be implemented using HTML and cannot be ripped of from the cu= rrent window, like in Chrome
=C2=A0= - Did not test in CentOS, but tested in Ubuntu and it is working (We tried = but the=C2=A0electron=C2=A0requi= red GLIBC 2.25 that was not on the version of CentOS that we had)
=C2=A0- In Linux despite the fact that we cl= ose the window, the application is still running and need to be killed by h= and
=C2=A0- We didn't test Debu= gger opening in new window
=C2=A0- = Loading screen has no reference to pgAdmin
=C2=A0- No logging file for the runtime
=C2=A0- Windows we are using python 3.4 and using prior versio= n of psycopg2 2.5.6 and pycrypto 2.6.1 (The version of psycopg2 is not the = correct one, this is because we couldn't find a precompile version of p= sycopg2)
=C2=A0- This is just a spi= ke and the code looks pretty messy. This need to be changed in order to mak= e it more readable and have some tests around it
=C2=A0- Murtuza and Fahar were not able to run the appl= ication in Windows
=C2=A0- Khushboo= was not able to run Ubuntu version

Given this was the status at = the time, we need to pick and choose what we really want to implement right= out of the box and what could be postponed. In order to generate Windows b= uild and ensure that the Linux build is working we need so help. If we coul= d have access to the machines that you use to build pgAdmin or access to th= e venv folder that is generated in these machines we could try to create a = build from that.

The changes we produced still applies cleanly on= master and can be found in:=C2=A0https://github.com/greenplum-db/pgadm= in4/tree/electron-over-master
<= br>
Thanks
Victoria & Joao

On Thu, Mar 22, 2018 at 12:58 PM Dave Page <dpage@pgadmin.org> wrote:
On Thu, Mar 22, 2018 at 4:28 PM, Dave Page <dpage@= pgadmin.org> wrote:

<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
<= div class=3D"gmail_quote">
2) This option is not ver= y appealing=C2=A0to me, because we would be pilling code into the QT portio= n of the application, that I hope we remove in the future, that currently i= s untested to solve a problem caused by a Window Manager......
I would be more in favo= r of creating a Application Indicator that would support 2 actions, Kill ru= nning pgAdmins and launch the browser to access them. There is a lot of int= eresting websites that talk about this, and how to develop. I had to downlo= ad one to have a docker indicator..... But as I said in a previous thread, = I believe that this should be a 3rd party application and not a first class= citizen on pgAdmin, as the majority of the ones that I found are.

I can't commen= t on the specific ways to sort it out, but I think *basing* things in optio= n 2 is by far the best option. If it's just an additional add-on that c= an be made a dependency of the packages it's not a huge problem (provid= ed this add-on is available on the major platforms like rhel, ubuntu, debia= n of course)

It would just be a modified version of what we have. Instead of having an = icon in the system tray, we'd probably have multiple Start Menu icons t= o replace the tray icon menu. They would have to signal a running instance = to do something, or become a new instance and then do the something if noth= ing is running already.

=
Of course, another option here might be to figure out th= at we're running under Gnome/GTK at runtime, and if so, create an indic= ator icon and menu instead of the tray icon. That is, apparently, what Skyp= e and other similar apps do now. The indicator icons go on the right of the= top menu bar (kinda like where tray icons go on macOS).=C2=A0
<= /div>


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitte= r: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgr= eSQL Company
--001a114ab7728af0cc056804779d--