triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.34k stars 393 forks source link

Commit and switch to Java 11? Drop Win32bit support? #4874

Closed DanVanAtta closed 5 years ago

DanVanAtta commented 5 years ago

Java 11

Due to a long story, java 8 is not supported with travis 'xenial' distro which is needed to get on the latest postgres, which is needed to allow for paged queries... See: https://github.com/triplea-game/triplea/pull/4872

I think we likely have also committed to bundling java with Triplea installers. With that, I can't really think of any reason to not jump to Java 11. Thoughts?

Windows 32 Bit Support

I think related to this, is that we'll need to drop win32 support. IIRC Java eventually is discontinued on windows 32 bit. Anyone know much about this and does it seem cool to drop windows 32 support?

FWIW, it does look like install4j does not offer windows32 bit java 11 versions for bundling: Screenshot from 2019-06-06 21-53-56

Related:

DanVanAtta commented 5 years ago

I've queued up and tested the changes to migrate to Java11: https://github.com/triplea-game/triplea/pull/4876, assuming that build passes (did locally FWIW), it was pretty straight forward.

RoiEXLab commented 5 years ago

I'd love to upgrade to java 11 👍 Ditching window 32 bit for this is a tradeoff, but it looks like this is caused because Oracle doesn't offer 32 bit builds since java 10 anymore. This leads to another important thing to consider: Is the bundle offered by install4j the Oracle JDK? If this is the case we should look for the openJDK, because of the licensing issues. Some vendors should still offer 32 bit builds, so at least in theory we could make that work. I recall there was a problem with bundling when we tried deploying JDK 9 back in the day, so we need to double check if deployment works once it's ready. Also we might want to consider moving to java 12 directly, because the LTS is just an Oracle thing IIRC.

DanVanAtta commented 5 years ago

Is the bundle offered by install4j the Oracle JDK?

Not sure, I wouldn't think so. If it turns out to be otherwise and is the Oracle JDK, we've some time before are "in production" with this latest and can switch relatively quickly before then. To hopefully find out for sure, I've sent install4j an email to confirm.

I recall there was a problem with bundling when we tried deploying JDK 9 back in the day, so we need to double check if deployment works once it's ready.

IIRC the problem was with upgrading to a latest JDK8 and the concern for JDK9 was we would not be able to advance the java version once already installed. Ultimately I don't think we'll be any worse off and I think it might come down to a key configuration where the install4j bundle was previously marked as "shared". IMO we should not block on this as our testing ability is going to be limited and not necessarily broad enough to be thorough. Meanwhile the cost to "go back" is very low and we should find out pretty quickly if any users encounter problems in the prerelease.

Also we might want to consider moving to java 12 directly, because the LTS is just an Oracle thing IIRC

My 2 cents is to first focus on going to Java 11. Java 12 seems a bit early right now even if LTS is an Oracle thing. Mainly though the jump to what is essentially the default JRE version, 11, hopefully will reduce the number of possible issues we could face (in travis, maybe in dev build environments, odd issues with bundle, etc). I wouldn't mind then if we get to Java 11 and then in the short or medium term then upgrade to Java 12.

DanVanAtta commented 5 years ago

@ron-murhammer / @ssoloff any objections to go to Java11?

The leg-work is done and a PR is ready. Beyond the 'smoke-testing' done so far, my hope/goal is that we'll be able to let a broad set of users QA the prerelease that will now have a bundled JRE. Given that rollback is pretty fast, we should know of problems pretty quickly, and that it'll be on prerelease only, the cost to reverse this decision is low. Given that we should know about problems quickly and the low reversal cost, I would judge the risk from a bad decision here is also low.

panther2 commented 5 years ago

So as far as I understand this issue I will need Java 11 being installed to continue playtesting the latest prereleases, then. I want to avoid installing a bundled version so I will need a system wide installation of Java 11.

Can I install Java 11 side by side to Java 8? Will the current stable of TripleA automatically use Java 8, then? I can't find an Java 11 JRE at www.java.com ... ? At oracle.com I only find a Java 11 SE download... so do I need the complete JDK to have a JRE?

Also: Will the bundled version of Java 11 be updated automatically when Oracle releases updates?

Thank you for any hints.

DanVanAtta commented 5 years ago

I want to avoid installing a bundled version so I will need a system wide installation of Java 11.

Why do you want to avoid installing a bundled version? AFAIK the bundled JRE would only be used for TripleA.

So as far as I understand this issue I will need Java 11 being installed to continue playtesting the latest prereleases

The bundled JRE will provide Java 11, you would not need anything extra beyond installing TripleA.

Can I install Java 11 side by side to Java 8?

Yes, switching between them can be a bit awkward depending on OS, but it is possible. For the most part Java 8 is getting to be pretty old and its usage is less and less. Often Java 11 can run Java 8 apps as well.

Will the current stable of TripleA automatically use Java 8, then?

Current release IIRC has a dynamic bundle that installs Java 8 if missing. Release versions are static, we will only push forward with new versions rather than updating existing ones. (Nuance, we can create a new 1.9 build even if we are on 1.10, but in any case we will not update a specific build number to have a new artifact, the build number should always uniquely identify any given artifact and we won't replace it).

Re: JRE, it looks like that could be gone. Looking for it I did not find as well, and found this (seems like JRE is perhaps gone):

https://dzone.com/articles/no-more-jre-packaging-no-big-deal-1

As has been announced some time ago, the Java Plugin's and Java Web Start's days are numbered. In fact, with the release of JDK 11, they are officially gone. Kaput. Never to return. And correspondingly, neither OpenJDK nor Oracle JDK 11 provide a JRE option for download either. Why did that happen?

To start, the JRE is a Sun/Oracle-only creation and not a real part of OpenJDK. In its quest to make the Oracle JDK and Open JDK as indistinguishable as possible, eliminating it makes some sense. With the removal of the aforementioned client deployment technologies, one could also argue the primary reason for the JRE's existence has gone away too. If a version of the JRE were to be produced for JDK 11, it would look a lot different than previous JREs. Finally, justifying the continuance of the JRE as a means to package a smaller footprint Java can be questioned with the introduction of Java modularization in JDK 9 and subsequent advances in JDK 11. Let's see why.

RoiEXLab commented 5 years ago

@panther2 The reason you can't find the version on java.com is an intentional decision. The idea is basically "No user should be required to install java in order to run an application found somewhere on the Internet, the application should ship the correct JRE on its own". With the "new" modular design starting with java 9 the JRE doesn't need to be shipped as a whole anymore, so with some extra work for the libraries that aren't using java 9 modules we could create a super small JRE only containing the code that triplea is actually using, so that could lower the download size if that's what's bothering you

RoiEXLab commented 5 years ago

@DanVanAtta You were faster than me ^^

panther2 commented 5 years ago

Interesting, thank you @DanVanAtta and @RoiEXLab for the background information.

As you know I do a lot of software support on both forums, so this knowledge is essential for me.

Indeed what was bothering me regarding bundled versions was that I have some more Java programs on one of my computers, and I would prefer to have one system wide Java instead of bundles for every app.

However I have not been aware of the modularity of the recent Java versions, so I thougt I would need a complete Java bundle for each Java app.

Now that I learnt about a "super small JRE" shipped with TripleA I see the advantages.

Still I need Java 8 for using 1.9.0.0.13066 and other software and I understood that (a bundled) Java 11 will not interfere here, correct? As the bundle only affects the new TripleA 1.10.xxxxx versions.

Once Java 8 and TripleA 1.9.0.0.13066 are deprecated this will not be an issue anyway.

One question remains open: Will the bundled version of Java 11 be updated automatically when Oracle releases updates? In other words: Will new (bundled) TripleA (pre-) releases always contain the latest JRE11 version?

DanVanAtta commented 5 years ago

Now that I learnt about a "super small JRE" shipped with TripleA I see the advantages.

One note, we're not there yet; the bundled JRE is currently 40MB. Once we move past Java 8 we can start on that path.

Still I need Java 8 for using 1.9.0.0.13066 and other software and I understood that (a bundled) Java 11 will not interfere here, correct? As the bundle only affects the new TripleA 1.10.xxxxx versions.

Correct

One question remains open: Will the bundled version of Java 11 be updated automatically when Oracle releases updates? In other words: Will new (bundled) TripleA (pre-) releases always contain the latest JRE11 version?

No, JRE bundles are deployed by us to: https://github.com/triplea-game/assets/tree/master/install4j and we then configured the build system to download a specific JREs. Eventually the installer app kicks in and packages it all together into a single installer file that is then copied to github releases.

panther2 commented 5 years ago

Understood, thank you!

ssoloff commented 5 years ago

any objections to go to Java11?

:+1:

DanVanAtta commented 5 years ago

Install4j responded, their bundled JDKs are based on 'AdoptOpenJDK', no Oracle licensing issues :+1:

RoiEXLab commented 5 years ago

👍

RoiEXLab commented 5 years ago

Just had a look at the 'AdoptOpenJDK' project, they are offering a win32 build as well, so we could technically use that one if users insist on using win32 bit

DanVanAtta commented 5 years ago

Thanks for doing that lookup @RoiEXLab

I checked the download counts for 32 bit and they are actually alarmingly high.

curl  "https://api.github.com/repos/triplea-game/triplea/releases/tags/1.9.0.0.13066" | egrep "name|download_count"

      "name": "TripleA_1.9.0.0.13066_macos.dmg",
      "download_count": 5255,
      "name": "TripleA_1.9.0.0.13066_unix.sh",
      "download_count": 2684,
      "name": "TripleA_1.9.0.0.13066_windows-32bit.exe",
      "download_count": 3568,
       "name": "TripleA_1.9.0.0.13066_windows-64bit.exe",
      "download_count": 21734,

There are more win32 downloads than unix and almost as many as Mac. My impression is that 32 bit OS's have become pretty rare, download counts that high make me think there may be more wrong decision than users intentionally needing 32 bit.

I opened a forum post to see if we can get some feedback from users who may be running 32 bit: https://forums.triplea-game.org/topic/1406/are-you-running-windows-32-bit-the-developers-would-like-to-know

Perhaps the best way to address that concern is to "hide" the 32 bit download behind a link like "need a 32 bit windows installer, click here".

Looking at the bundle, it comes in a zip format and so maybe needs repackaging to a 'tar.gz', but I'm not sure and maybe the zip would work. My concern is with difficulty to test the installer. I realize the overhead is likely one-time, so maybe it is worth it, but at the same time our time to develop and maintain TripleA is priceless and we need to be careful about excessive overhead.

I think maybe we could run an experiment where we look at the rate of downloads, hide the 32 bit download, and see if the download rate of 32 bit installers decreases. Given I'll be traveling again soon, I won't be able to record those numbers myself.

I'm a bit tempted to say it's time to pull off the band-aid, drop win-32, and if we get feedback that users have been locked out, then invest the time once we know it'll surely benefit someone.

beelee1 commented 5 years ago

I checked the download counts for 32 bit and they are actually alarmingly high.

yea that's a bummer. Was hoping it was less. As you said though, some are probably DL 32 when they don't need too. Couldn't find how long microsoft is gonna offer 32. Maybe just go with what RoiEX offered above.

I admit idk the details of what all is going on, but if somebody has a windows 32 system, a lot of them probably struggle updating or maybe their machine just can't do it.

Sorry for an uninformed opinion : )

Edit Idk how close this new stable is. i assume you're gonna have both active for a while like last time when you switch ? Maybe try it then and if too much blowback you should know pretty quickly. Although I would think most wouldn't change til they had too so...

DanVanAtta commented 5 years ago

@beelee1

As you said though, some are probably DL 32 when they don't need too. Couldn't find how long microsoft is gonna offer 32. Maybe just go with what RoiEX offered above.

I would suspect over 90% of the DLs for 32 bit should instead be 64. 64 bit has been out for over a decade, in 2017 and 2018 lots of applications stopped offering 32 bit support completely. 32 bit is becoming to be entirely phased out.

I think the question is how many Windows 7 users do we have, and how many of them have a 32 bit OS? All Mac users would be on 64 bit, they stopped offering 32 some time ago, and currently we do not package a 32 bit unix distro.

Maybe just go with what RoiEX offered above.

There is work to be done on our part to re-package the 32 bit distro. It's not just a drag and drop operation regrettably and hence the need for someone to try and test it. It looks like @RoiEXLab might be able to do that.

DanVanAtta commented 5 years ago

Unless there is an 11th hour objection, going with Java11 and keeping win32 seems to be direction.

DanVanAtta commented 5 years ago

Java 11 update is merged! We also now bundle, always, a java with the installer. That should hopefully resolve a number of problems.

https://github.com/triplea-game/triplea/pull/4876

panther2 commented 5 years ago

Oh wow, the installer size increased to 76 MB (+60 MB). If only Github would allow for faster downloads...