BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.01k stars 446 forks source link

develop new GUI using Electron #3185

Open davidpanderson opened 5 years ago

davidpanderson commented 5 years ago

Electron (https://electronjs.org/) is a possible framework for developing a new GUI. It's cross-platform, uses HTML for layout and CSS for styling. It seems to be widely used and well-supported.

If anyone is interested in working on this, please let me know.

BTW, the BOINC client exposes GUI RPCs via HTTP; I've verified that these work with the HTTP and XML features built into Javascript.

lfield commented 5 years ago

This is similar to issues #2112, #2113 and PR #2275. Even though the BOINC client exposes GUI RPCs via HTTP, it is not possible to use this directly from a browser. As far as I understand Electron uses Chromium so will have the same issue. To make this work the client needs to provide a Web socket. There are some security concerns related to this that have been discussed in PR #2275. I believe that it is possible to do this but have not had time to make any progress but could do so if we consider this a direction we would like to go.

adamradocz commented 5 years ago

I'm working on a complete rewrite of the Boinc Manager. It uses a shared code (.NET Standard) and some platform-specific code. It will work on:

Electron.NET could be a good candidate for Linux and Mac.

davidpanderson commented 5 years ago

Electron doesn't have the RPC security issue.

lfield commented 5 years ago

Electron might not but to make it communicate with the BOINC client you need to add a WebSocket. I remember us discussing this during the hackathon at the workshop in Paris. As soon as you do this you open the client to JS drive by attacks. Hence we have to be quite sure regarding the security considerations of this approach. It is one of the reasons why PR #2275 was closed rather than merged.

davidpanderson commented 5 years ago

I have an Electron app that communicates with the BOINC client over TCP, just like the WxWidgets GUI does. Take my word for it.

lfield commented 5 years ago

That's interesting. I wonder how it works. Do you have any sample code to try?

UweBeckert commented 5 years ago

Electron creates a stand alone app. The chromium inside electron is a browser just for rendering html/css and running javascript. It doesn't has the "same origin policy" and other security feature which a normal browser has. I wrote already electron applications which communicate via http to different server or which run soap operations and also parses xml.

CyberTailor commented 4 years ago

If BOINC Manager uses Electron, it'll become too bloated and, moreover, it'll be harder to make packages for Linux distros (*sad gentoo user sounds*)

davidpanderson commented 4 years ago

The current GUI, based on WxWidgets, is about as bloated as you can get, in terms of source code which is what matters. Electron could reduce this by a factor of 10.

ScyllaHide commented 4 years ago

If BOINC Manager uses Electron, it'll become too bloated and, moreover, it'll be harder to make packages for Linux distros (sad gentoo user sounds)

yes thats my thought too! but on the other hand i know not to much about the current old gui BM has.

to be honest im using most of the time the BoincsTask v1.78 app on windows. it does so much compared to BM.

StaticallyTypedRice commented 4 years ago

Electron is a bad idea. It's bloated as others have mentioned, and it's also extremely resource hungry and will eat into the compute power that could have been used for actual BOINC tasks. On something like a phone, Raspberry Pi or older computer set aside for BOINC computation, this can be significant. Even on a high end computer it's undesirable.

Worse, Electron relies on Chromium which Google controls, and if I recall correctly has been shown to have privacy issues (like phoning home to Google) even though it's not full Google Chrome. I implore you to use something else, like GTK, Qt, one of the Java/Kotlin GUI libraries.

StaticallyTypedRice commented 4 years ago

The current GUI, based on WxWidgets, is about as bloated as you can get, in terms of source code which is what matters. Electron could reduce this by a factor of 10.

At the cost of significantly higher resource usage on the user's computer and possible privacy issues with the embedded Chromium instance.

ghost commented 4 years ago

Please don't use Electron. GTK or Qt are both way better than Electron.

AenBleidd commented 4 years ago

@fturco, what are your arguments?

ghost commented 4 years ago

Well... I already have GTK and Qt installed on my Gentoo Linux system, and I prefer not installing other packages, especially if they require long build times.

CyberTailor commented 4 years ago

@fturco, GTK isn't truly cross-platform so it isn't an option. Also there are more important tasks than reimplementing GUI.