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:
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.
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.
To a large extent, Java has long been dominated by Oracle. 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. Today, the Java environment dominated by Oracle has changed. 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 by Oracle 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.
Alibaba Dragonwell is a free OpenJDK release version that provides long-term support, including performance enhancements and security fixes, which actually correspond to the features that Oracle's charges for. 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:
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)
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 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.
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.
Unlike Oracle JDK, 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. Before that, Oracle had provided free support for JDK 8 for five years, until it was time to enter the community maintenance stage.
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.
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?
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:
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.
The Java ecosystem began to show a trend of fragmentation long ago, which seems to have intensified since Oracle began to charge for the service. 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
Alibaba Developer - March 28, 2019
Alibaba Developer - August 8, 2019
Aliware - May 20, 2019
Alibaba Cloud Storage - June 19, 2019
Alibaba Clouder - January 27, 2020
Alibaba Clouder - December 19, 2017
More Posts by Alibaba Developer