Replies: 1 comment
-
Hi! Thanks for opening this discussion, I can imagine this being a common question people will always be asking about this project so this is a good opportunity for me clear up my thoughts on it. I've been aware of Tauri for a while, NW.js and NeutralinoJS are some other alternatives I've looked at. There's way more listed here that I've not looked into. I'll be up front about my main motivation for using Electron, which is it's tech I've used before and allows me to leverage my primary language that I have lots of experience with, which is TypeScript, for both frontend and backend. My background is in web tech in general, which lets me use all the tools I'm already comfortable with, including Vue and Node.js. You may or may not know, but I built and maintain https://bar-rts.com, which I wrote with much the same tech stack, minus Electron. I wrote a replay parser and map parser in TS for node that was necessary for this project, and that paved the way for me to consider writing a lobby client for BAR, because I could use these tools directly inside a node app using Electron. Despite that, I know Electron has its shortcomings, and I'd be lying if I said I thought it was absolutely the best tool for the job. However, there's several other factors I think are worth considering here other than bare metal performance. The first and arguably most important aspect (imo) is developer experience and ease-of-contribution. As BAR is an open-source project, it's vitally important that the main technologies we use are well known and well understood. As Electron uses node, it has the great benefit of letting us use the same language (TypeScript) for both the frontend and the server (main process in this case). That also gives us access to npm, which is the largest third-party package provider (and I'd bet it's not even close), which is massively helpful for what's been a mostly solo project, which I only work on in my spare time. Another reason is that Electron is mature, as you said. Knowing popular and performant apps such as VSCode and Discord are possible using Electron gives me some confidence that choosing it isn't the worst decision ever. Its popularity means there's a wealth of information, tools, guides and support for it, which again is important for an open-source project which involves many developers of different backgrounds and experiences. In terms of performance, that hasn't presented itself as being a possible issue so far. I admit I'm not thrilled about the way Electron apps all ship with their own Chromium runtime, and Node/V8 themselves also might not be as crazy performant as something like C++ or Rust - but I've also got no reason to believe that the chosen tech isn't fit for purpose. As of right now, BAR Lobby uses between 100-200MB for me, which I would argue is a perfectly reasonable expectation for a game (even though it isn't actually the game itself, the assumption of sizable resource consumption exists from a player perspective). With all that being said: I'm still open to the prospect of shifting to an Electron alternative at some point, if the reasons were strong enough. But right now my focus is on getting this project to its first major milestone, i.e. public release and general adoption over Chobby. Once it gets to a point of relative stability, and when I get some breathing room, then I'd be happy to reasses and more optimistically consider Electron alternatives. |
Beta Was this translation helpful? Give feedback.
-
Hey there, thanks for the great work and making this open source ❤️
I just watched the developer introduction youtube vid. Near the start, there is a bit about the other alternatives considered for Electron. It was mentioned that they were considered but maybe were not mature enough.
I was curious if one of the options put forward was Tauri? https://tauri.app/
With all other things equal (AFAIK) this would be my opinionated breakdown of the pros/cons:
Could be an option to keep in mind if Electron's performance starts to become a problem
Cheers 😄
PS: I promise to contribute to the open tickets instead of just being someone with an opinion soon 😆
Beta Was this translation helpful? Give feedback.
All reactions