×
Community Blog Alibaba Makes Dragonwell OpenJDK Open Source

Alibaba Makes Dragonwell OpenJDK Open Source

Alibaba boosts the Java community by making their version of OpenJDK, Alibaba Dragonwell, open source.

By Yuying Zhao

InfoQ reporters have been exclusively informed that Alibaba is about to make Alibaba Dragonwell, a long-term support version of OpenJDK, open source. As we all know, Oracle's attitude towards Java has undergone a series of changes. Due to the large number of Java users, this issue is expected to be the focus of discussion among developers for a long time.

As one of the largest Java users in the world, Alibaba has made many considerations when deciding to make Alibaba Dragonwell open source. This coincides with the following announcements:

  • Oracle has announced that Java 8 official support for personal users will last until December 2020, and for commercial users, no free updates are available after January 2019.
  • Red Hat has planned to continue providing support for OpenJDK 8 until 2023.
  • AWS has officially launched Amazon Corretto, a long-term support version of OpenJDK.

Now, Alibaba has announced to make Alibaba Dragonwell, a long-term support version of OpenJDK, open source.

The trend towards fragmentation within the Java ecosystem is becoming more and more obvious. For developers, they do not want to take the risk of an immediate replacement, but also want to use JDK with continuous security updates and full functionality.

So how does Alibaba address the needs of developers? Would making Dragonwell open source impress users who stick to Java 8 and solve their urgent needs? In the future, how does Alibaba plan to handle the relationship between this project and OpenJDK? How does the company, with billions of lines of Java code, see the future of Java?

In response to problems above, InfoQ reporters have exclusively interviewed Li Sanhong, a senior technical expert of Alibaba Cloud Intelligent Basic Products Division, and Kingsum Chow, a researcher of Alibaba Cloud Intelligent Basic Products Division, to hear how they view Alibaba Dragonwell and the fate of Java.

What Is Alibaba Dragonwell

Many developers in the Java ecosystem must have heard about the origin of the name of the project Corretto, the long-term support version of AWS open-source OpenJDK. Corretto evolved from Caffe Corretto, an Italian drink that refers to espresso with a small amount of liquor. Coincidentally, Alibaba's Dragonwell name is also related to a popular beverage.

According to Kingsum Chow in the interview:

The Chinese translation of "Dragonwell" is Longjing, which is a symbol of Chinese tea culture and happens to be a characteristic of Hangzhou (where Alibaba headquarters is located). The term "well" is usually described as a gathering of water sources for everyone to enjoy. We hope that we can gather the strength of all developers to continuously improve the project and eventually contribute it to all users.

Why Make It Open Source Now?

Since the end of 2017, Oracle has gradually changed its Java strategy, gradually making commercial functions in Oracle JDK open source to the community, and announced that it would no longer provide free commercial version updates, security updates and vulnerability repair support.

What does this mean for developers? If you are an Oracle JDK 8 user, the original license can still be used free of charge, but you need to pay in order to get continuous security updates later. As one of the largest users of Java, Alibaba has one of the largest Java application clusters in the world, so it definitely needs to do something.

In the interview, Sanhong Li said that the series of changes delivered an important message:

If you want to continue using Java for free and get continuous updates, you may need to switch to the Community version later.

Based on this, Alibaba decided to make Alibaba Dragonwell, a long-term support version of OpenJDK, open source for two reasons. First, it has a large number of Java customers and business needs. Alibaba hopes that they can continue to enjoy all JDK functions free of charge. Second, considering that many developers may make new choices, Alibaba decided to make the Dragonwell project open source to provide a new reference for developers.

Key Features of Dragonwell

Alibaba Dragonwell is a free OpenJDK release version that provides long-term support, including performance enhancements and security fixes. According to Sanhong Li, Alibaba Dragonwell currently supports x86-64/Linux platform, mainly aiming at the optimization and improvement of Java application stability, efficiency and performance under the condition of large-scale Java application deployment in the data center.

This preview version of Alibaba Dragonwell 8 corresponds to OpenJDK 8 and is compatible with the Java SE Standard. The following three characteristics deserve special attention:

  • It ports the Java Flight Recorder (JFR) function of the upstream Java 11. As we all know, the JFR function is a commercial function of the Oracle JDK, which requires a fee to use. Although the function is open source for OpenJDK 11 and later, the number of Java 8 users are still very large. Therefore, Alibaba decided to port this function to Alibaba Dragonwell 8 for developers to use. Java developers can use JFR to collect detailed profiling information during JVM operation, and to improve the efficiency of problem diagnosis and performance optimization of Java applications together with Java Mission Control (JMC).
  • It integrates JWarmup technology. The Warmup problem has always been one of the most difficult problems in Java applications. Although Alibaba has had a solution for a long time, it is difficult for external users to reach this solution. Today, JWarmup has been established as Java Enhancement Proposal (JEP) in OpenJDK, and is expected to join the Java Standard release version in the future. JWarmup allows users to dynamically pre-compile Java code in advance in combination with the application traffic scheduling timing in the data center, thus effectively reducing problems caused by traditional Just-in-Time Warmup, like excessive CPULoad and response time timeout.
  • It provides improvements in service capabilities, such as GC diagnosis.

Presumably, some developers have discovered that Alibaba Dragonwell currently only supports Linux platform, which is also the operating system used by most data centers. To prevent developers from misunderstanding, a special note is required here that this does not affect the cross-platform feature of Java. The cross-platform feature refers to the Java application itself, while JDK (including JVM) is only a software. Different platforms have different versions. You just need to install the corresponding JDK on the corresponding platform. Developers can develop Java applications on any system, and then deploy them on the corresponding platform to run bytecode files. (Once the project is open source, Alibaba will provide detailed usage documents in both Chinese and English)

Future Plans

In the future, Alibaba hopes to have a version iteration every quarter, and the GA version is expected to be released in the next phase, that is, in three months. In addition, the Alibaba JDK technical team continues to maintain and update the project, and works closely with the OpenJDK community to promote the development of Java technology.

Moreover, considering the actual needs of users and the large number of Java 8 users, Alibaba is also considering to continuing porting excellent functions from future versions of OpenJDK to Alibaba Dragonwell, similar to the Java Flight Recorder function mentioned above, for developers to use in advance in the production environment.

Alibaba and Java

Alibaba was invited to join the JCP Executive Committee for a term of two years in 2018, and it is also the first Chinese enterprise to join the JCP. JCP is an open international organization and the executive committee of Java. It consists of Java developers and authorized persons. Its main function is to develop and update Java technical specifications, which means Alibaba has a certain rights in the formulation of Java standard specifications and can participate in the decision-making of major events in Java ecosystem.

According to the survey, Alibaba is one of the largest Java users in the world, with a very large number of Java developers and servers, which corresponds to its business development. When it comes to Alibaba, the easiest tag to come up with is "Singles' Day" - the world's largest shopping carnival. In 2018, the total transaction volume on Tmall "Singles' Day" eventually reached 213.5 billion, breaking 100 billion in less than 2 hours. Java is the biggest hero behind the efficient operation of the support system.

With the increase in volume and complexity of business requirements, Alibaba decided to make a complete switch from PHP to Java in 2004, and urgently needed a more efficient way to solve the problems in the production environment. This forced Alibaba to build its own solutions based on open-source technologies to guide Java developers to quickly locate and solve problems.

Internet enterprises operate very fast, and sometimes many product versions need to be iterated within a week, which can lead to many problems. If all these problems rely on waiting for official updates to be solved, the entire front-end will be affected and the business cannot afford to wait. This is also a very important reason why many Internet companies choose to use open source products for key services: To quickly build solutions that match business development in an autonomous and controllable manner.

As early as 2010, Alibaba began to customize JVM optimization based on OpenJDK 6. This is the first optimized, customized and open-source server version of Java virtual machine in China. After that, several teams within Alibaba began to participate in JDK research and development one after another (yes, it was actually done by several teams at the beginning). Later, Alibaba considered that JDK, as an important infrastructure, covered almost all business scenarios, such as logistics, finance, e-commerce, new retail, and Cainiao, and it was definitely not feasible to carry out research and development separately for a long time, so all JDK teams were merged into one.

In 2015, the unified Alibaba JVM team began to optimize and customize based on OpenJDK 8, and launched the well-known customized AJDK (Alibaba/AlipayJDK), which hosted almost all the core applications of Taobao, Tmall, Ant and Cainiao, and withstood the shopping frenzy on "Singles' Day" many times.

So, Is the Current Open-Source Alibaba Dragonwell the Same Thing as AJDK Which Is Used Internally by Alibaba?

Judging by the business operation of Alibaba, the functions and performance of AJDK are indeed good, but the open-source Alibaba Dragonwell is still different from AJDK. According to Sanhong Li, Alibaba Dragonwell is an open-source version of AJDK and the successor to AJDK technology. Currently, the open-source version does not include all functions of AJDK, such as multi-tenancy, Wisp coroutine, and ZenGC. The main reason is that preparing to make a technology open source takes a long time.

As for the current preview version of Alibaba Dragonwell 8, Alibaba has also conducted many internal discussions, and undergone significant preparation, testing, and communication. After confirmation, it took another six months to finally make the preview version open source. Later, Alibaba has considered gradually transferring the AJDK functions to Alibaba Dragonwell. Obviously, this work takes time.

There Are Several Popular JDK Releases Available. What Should We Do with OpenJDK?

OpenJDK is an open-source project based on GPL v2/a Classpath Exception. It has been the official reference implementation of Java SE since Java 7. According to an OpenJDK Committer in an interview, OpenJDK has a common practice. After years of free support, Oracle JDK's lifecycle is coming to an end, so the community took it over and handles subsequent updates.

Nowadays, many mainstream international vendors are using OpenJDK, such as Google, Twitter, Amazon and Alibaba, and have developed JDK versions based on it. This worries developers in the ecosystem: When many users start to consider using OpenJDK, do these large vendors still want to participate in the maintenance for the entire community?

From the perspective of Alibaba, Sanhong Li has repeatedly stressed one point of view in the interview:

Alibaba Dragonwell must be downstream of OpenJDK. Each Alibaba Dragonwell release synchronizes the latest upstream updates, and undergos a large-scale application cluster testing within Alibaba. At the same time, Alibaba also actively contributes the technical accumulation on AJDK to OpenJDK, and actively participates in community project updates and maintenance.

AWS's perspective is quite similar. Arun Gupta, the chief open-source technical expert at AWS, once announced on AWS open-source blog that:

We look forward to working closely with the OpenJDK community to develop future enhancements for OpenJDK 8 and 11.

In my opinion, under these circumstances, JDK software launched by major vendors are bound to be slightly different from OpenJDK, which is easy to understand. The actual problems encountered by the customer's production environment may not be suitable for improvement of OpenJDK, and when facing the same problem, the OpenJDK solution may not be consistent with the ideas of major vendors, which requires friendly negotiation among various parties and gradually forms a beneficial mechanism. Now, it is only the first step to promote OpenJDK.

The Fate of Java

With more and more choices, the ecosystem seems to be even more "fragmented". Are developers who stick to Java 8 willing to migrate to OpenJDK in the future?

Users Who Stick to Java 8

Since Java 8 and Oracle JDK 8 have many problems, why aren't developers migrating to the newer versions on a large scale? Why is Alibaba Dragonwell initially basing itself on OpenJDK 8? The answer to this question is simple:

Java 8 Is Currently the Most Widely Used Version, and Its Users Are Very Persistent!

In the Java ecosystem, you can find a very interesting phenomenon: No matter how tempting a new version's updates are, most Java developers do not seem to be interested and still stick to their own choices. Indeed, Java 8 is such a successful release that many developers do not think it is necessary to update other versions, which may be related to the long-established habits and inherent trust.

In this regard, Sanhong Li believes that over the years of Java development, most developers have become accustomed to trusting the official Oracle JDK, and have not paid enough attention to OpenJDK. Therefore, switching from Oracle JDK to OpenJDK requires a process. However, with the efforts of these international technology large vendors, the OpenJDK ecosystem will be improved and its functionality will be more complete. In the face of continuous security updates and in-depth participation from many large vendors, this project should become an important public resource in the Java ecosystem.

An Increasingly Fragmented Ecosystem

The Java ecosystem began to show a trend of fragmentation long ago. Previously, to reduce potential concerns about fragmentation, AdoptOpenJDK strongly encouraged all OpenJDK providers to submit patches to OpenJDK.

In this regard, Kingsum Chow believes that there are more and more choices for developers, which is not necessarily a bad thing. Moreover, different versions are actually very compatible with each other, and the migration cost is almost zero, which will not create extra burden for users. Different versions do have some differences in performance optimization and platform support. Developers can choose according to their needs. However, Alibaba is trying to push these technologies upstream, that is, to the entire OpenJDK ecosystem. This problem should be alleviated in the future.

Alibaba has announced that Alibaba Dragonwell will be made open source from March 21, 2019. Starting then, developers will be able to download it from the Alibaba Cloud GitHub community and use it.

This article is reproduced and translated from the same topic article in InfoQChina

0 0 0
Share on

You may also like

Comments