Friday, November 9, 2018

State of Java in 2018

2017 has been a turbulent year in the Java world. The long-awaited version of Java 9 brought many changes and interesting new features, and Oracle announced a new launch schedule for the JDK.

And that was just the beginning. In the past, developers often complained that Java was not developing fast enough. I do not think you will hear such complaints in the near future. It may be the opposite.

What is reserved for 2018

In 2018, the JDK will follow a new launch schedule. Instead of a huge release every few years, you will receive one less every six months. Then, after the release of Java 9 in September 2017, Java 10 is already planned for March 2018. But more about that later.

Overview of the business stack

Most corporate projects do not use the JDK alone. They also have a stack of corporate libraries, such as Spring Boot or Java EE, which will also evolve in the coming months. In this article, I will focus mainly on the JDK. But here is a quick overview of what you should expect from the two main stacks of business in the Java world.

The Spring development team is working hard on Spring Boot 2 and released the first release candidate in January. The team does not expect any major changes to the API and does not plan to add new features to the final version. Therefore, if you are using Spring Boot in your projects, it is time to take a closer look at the new version and plan the updates of your existing Spring Boot applications.

At the end of 2017, Oracle began delivering the Java EE specifications for the EE4J project managed by the Eclipse Foundation. As expected, this transfer is a big project that can not be completed in a few days. There is a lot of organizational and technical work that still needs to be done. Java EE needs a new name and development process. And the transfer of the source code and all the artifacts stored in different bug trackers is still underway. We will have to wait a little longer to see the effects of the transfer and the stronger participation of the community.



Short release and support cycles of JDK

As announced last year, Oracle will release two new versions of the JDK in 2018. Instead of the slow release cycle, in which every few years we produce a new release with many changes, we will now have a lower version every six months. This allows a faster innovation of the Java platform. It also reduces the associated risks of a Java update. For Java developers, these minor releases will also greatly facilitate the familiarization process with the latest changes and apply them to our projects.

I hope this is a very positive change for the Java world. It will add new dynamics to the development of the Java language and will allow the JDK team to adapt and innovate much more quickly.

Changes and new features in JDK 10

Due to the short launch cycle, Java 10 brings only a small set of changes. You can get an overview of the 12 JEP (proposal for improvement of the JDK) currently included in the JDK10 page of OpenJDK.

The most notable change is probably the support for inference of local variable types (JEP 286). But you should also know about the new release version based on time (JEP 322) and the full parallel support of the GC (garbage collector) added to the G1, or the Garbage First (JEP 307).

Release version based on time

Beginning with Java 10, the format of the Java version number is changed to improve support for a time-based release model.

The main challenge presented by the new launch model is that the content of a release is subject to change. The only thing defined at the beginning is the time when the new version will be released. If the development of a new feature takes longer than expected, it will not be cut to the next version and will not be included. Therefore, you need a version number that represents the passage of time instead of the nature of the changes included.

JEP 322 defines the format of the version number as $ FEATURE, $ INTERIM. $ UPDATE. $ PATCH and plan to use it in the following way:
• Every six months, the development team will publish a new resource version and increase the $ FEATURE part of the version number.
• The release published in March 2018 will be called JDK 10 and the September release of JDK 11. The development team declares in JEP 223 that they expect to send at least one to two significant resources at each resource launch.
• The $ INTERIM number is maintained for flexibility and will not be used in the currently planned 6-month accounting model. So, for now, it will always be 0.
• Updates will be released between resource postings and not include any incompatible changes. One month after the release of a resource and after every three months, the $ UPDATE part of the version number will be increased.

Complete GC parallel in G1

For most developers, this is one of the smallest changes. Depending on your application, you may not recognize it.
The G1 has become the standard garbage collector in JDK 9. Its design attempts to avoid complete garbage collections, but that does not mean they never occur. Unfortunately, the G1 uses only a single-threaded mark-sweep-compact algorithm to execute a complete collection. This can result in a decrease in performance compared to the parallel collector previously used.

JEP 307 addresses this problem by providing a multi-threaded implementation of the algorithm. Starting with JDK 10, you will use the same number of threads for complete collections, as applied to new and mixed collections.
Therefore, if your application forces the garbage collector to complete collections, the JDK 10 can improve its performance.

Plans for JDK 11

The JDK 10 has not yet been released, and there are only seven months left until the launch of JDK 11. So, it is not surprising that there is already a small set of PEC planned for the second release of the resource in 2018.

In addition to the removal of obsolete Java EE and CORBA modules (JEP 320) and a new garbage collector (JEP 318), JDK 11 will likely present dynamic class file constants (JEP 309) and support the keyword var implicitly. typified lambda expressions (JEP 323).

The current scope of JDK 11 shows the benefits of shorter launch cycles. JEP 309 and 318 introduce new functionality, while the other two JEPs use an iterative approach to develop existing resources.

With the launch of JDK 9 in September 2017, the Java EE and CORBA modules became obsolete. A year later, with the release of JDK 11, JEP 320 removes them from JDK. So, instead of keeping them for several years, they will be removed in a timely and predictable manner.

And JEP 323 is a logical next step after JEP 286 introduced type inference for local variables in JDK 10. You should expect to see this approach more frequently in the future. Short launch cycles make it much easier to send a huge resource in several logical stages distributed in one or more resource releases.

Interested in learning Java? Join now:” java training in chennai “

Short support cycles require rapid adoption

Along with the new release model, Oracle also changed its support model. The new model differentiates between short and long-term launches.
Short-term versions, such as Java 9 and 10, will only receive public updates until the next release of resources is published. Thus, support for Java 9 ends in March 2018, and Java 10 will not receive public updates after September 2018.

Java 11 will be the first long-term release. Oracle wants to support these releases for a longer period. But so far, they have not announced how long they will provide public updates for Java 11.
As an application developer, you will have to decide if you want to update your Java version every six months or if you prefer a long-term release every few years. In addition, Oracle encourages everyone to migrate to the Java SE Advanced product. Includes at least five years of support for all long-term releases.

Interested in learning Java? Join now:” java training in bangalore

Summary
In the past, many developers complained about the slow evolution of the Java language. This will no longer be the case in 2018. The new 6-month launch cycle and adapted support model will impose faster updates on existing applications and introduce new features on a regular basis. In combination with the evolution of existing structures, such as Java EE or Spring, this will add a new dynamic to the Java world. And it will also require a change of mentality in all the companies that are used to update their applications every few years.




No comments:

Post a Comment

From Java 8 to Java 11

Switching from Java 8 to Java 11 is more complicated than most updates. Here are some of my notes on the process. Modules Java 9 i...