2022 Java生态系统报告

Recently, New Relic released the latest 2022 Java Ecosystem Report. This report can help us gain an in-depth understanding of the latest usage of the Java system. Let's take a look at the development of Java in 2022, or Java 8 YYDS ?

Java 11 becomes the new standard

In 2020, Java 11 has been launched for more than a year, but at that time, the share of Java 8 was as high as 84.48%. Two years later, the proportion of production on Java 11 surpassed Java 8 for the first time, and the share has reached 48.44%. Java 8, the overlord of the past, almost fell by half, occupying the second place with 46.45%.

Java 11成为新的标准

And the general trend of Java 17, which the entire Java ecosystem is embracing, is still in a relatively low position on the list. This is actually expected, because ecological support still needs a certain amount of time to evolve. For example, Spring, the big base of the Java ecosystem, will have to wait until the release of Spring Boot 3 at the end of this year for important support for Java 17 (I feel for this part). Interested friends remember to pay attention to me, the public account program ape DD, long-term sharing of this cutting-edge professional interpretation), at the same time, other surrounding frameworks and middleware must be fully upgraded before they are truly mature for production. Spend.

Therefore, it is still a good choice to go from Java 8 to Java 11 first, run fast, avoid directly from Java 8 to Java 17 when you have time, the steps are too big, and it is not good to drag x...

I am serializing the interpretation of new features after Java 8. This time, I changed the previous blog style and wrote it in the way of document ( https://www.didispace.com/java-features/ ) + video ( B station , video number) , more reading and learning experience. Interested guys can follow and collect, it is better to forward and share, so that there is more motivation to update.

Most popular non-LTS version: Java 14

Starting with Java 9, the release pattern for Java versions has changed. A new version is released every 6 months, but these are only officially supported until the next release. The purpose of this is to make new features available more frequently.

However, these ephemeral non-LTS versions have consistently been very low in usage compared to LTS versions in production, with only 2.7% of applications in use.

While some vendors like Azul Systems provide patches on some non-LTS releases, most do not. This may be the reason why people are reluctant to use it. Among non-LTS Java releases, Java 14 is the most popular.

最流行的非LTS版本:Java 14

Oracle is shrinking, Amazon is rising

In this report, it is worth paying attention to the changes in the JDK distribution. While most developers still get their JDK from Oracle, the open source content in the OpenJDK project has yielded a rich selection.

Oracle在缩水,Amazon在崛起

The image above shows Oracle's changes following tighter license controls on its JDK 11 release (before returning to a more open stance with Java 17). In 2020, Oracle is the most popular vendor by absolute advantage (about 75% of the Java market). 2 years later, and while they are still in the top spot, their share has halved. Amazon’s market share has risen sharply to 22% from 2.18% in 2020.

There are also some interesting changes from November 2021: Eclipse Adoptium and Amazon are in almost exact opposite positions on this list ahead of Java 17's release.

Resource allocation in containers

Configuration of computing resources

Containers affect how people allocate computing and memory resources. The data in this report shows that a much higher percentage of applications running in containers have fewer than four cores.

计算资源的配置

In a cloud environment where people often deploy containers, the drive to run at a small scale makes sense. But this trend may create unexpected problems for some applications. For example: many of the concurrency benefits of using the default G1 garbage collector on recent JVMs disappear when running fewer than 2 cores. All those single core instances are probably using the serial collector and paying a performance price for it, but many people probably don't even know it.

Configuration of memory resources

A similar trend emerges when comparing memory settings, they tend to allocate smaller memory to instances in containers.

The report shows that only about 80% of containerized applications explicitly request JVM memory caps via the -XMX or -XX:MaxRAMPercentage flags. As of Java 9, container awareness in the JVM means that this may not pose a security issue for these applications as it has in the past, as long as the JVM is the only process running in each container.

内存资源的配置

Most commonly used garbage collection algorithms

Garbage Collection (GC) algorithms play a central role in JVM performance, so this has always been the most discussed topic in the community. New data shows that the use of garbage collectors has changed significantly after Java 8.

The overall popularity of the G1 is very high. This result is not surprising considering that the G1 collector on Java 11 and later has updated default settings and higher performance.

I put the original report in the official account. If you are interested in the details, you can send the keyword: relic-java-2022 in the official account to get the full report.

Well, that's it for today's analysis! If you encounter difficulties in the learning process? You can join our high-quality Spring technical exchange group , participate in exchanges and discussions, and learn and progress better!

Welcome to my public account: Programmer DD. Learn about cutting-edge industry news for the first time, share in-depth technical dry goods, and obtain high-quality learning resources

程序猿DD
2.2k 声望2.8k 粉丝

作品:《Spring Cloud微服务实战》、SpringForAll社区、OpenWrite、Youtube中文配音