Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Summer 2024] Nacos 支持 Java native-image 运行方式 #12028

Open
KomachiSion opened this issue Apr 25, 2024 · 0 comments
Open

[Summer 2024] Nacos 支持 Java native-image 运行方式 #12028

KomachiSion opened this issue Apr 25, 2024 · 0 comments
Labels

Comments

@KomachiSion
Copy link
Collaborator

KomachiSion commented Apr 25, 2024

开源之夏是由中国科学院软件研究所“开源软件供应链点亮计划”发起并长期支持的一项暑期开源活动,旨在鼓励在校学生积极参与开源软件的开发维护,培养和发掘更多优秀的开发者,促进优秀开源软件社区的蓬勃发展,助力开源软件供应链建设。

Nacos将会作为指导组织参加本次的“开源之夏2024”

背景

native-image 是Java在jdk17时引入的一个新特性, 它可以将 Java 代码提前编译成二进制文件——一个本地可执行文件。一个本地可执行文件只包含运行时所需的代码,即应用程序类、标准库类、语言运行时以及来自 JDK 的静态链接的本地代码,以提高Java应用的启动和运行效率。
随着spring boot3的成熟和推广,且能够支持Java native-image运行,越来越多的应用开始以native-image的方式进行启动,Nacos社区中也涌现出大量需要Nacos支持native-image运行的支持需求,例如#9997 ,#11402等。

因此Nacos社区希望通过开源之夏,让Naco的Java客户端和服务端,都能够支持native-image,以提高Nacos的启动速度和运行效率,同时满足社区的需求。

目标

让Nacos的Java客户端和服务端,都能够通过native-image的技术启动并稳定运行,以提高Nacos的启动速度和运行效率。

难度

进阶

导师

王建伟
[email protected]

产出要求

  • Nacos-Java-Client支持native-image的方式启动,例如通过GraalVM,修复Nacos客户端通过native-image的方式启动时的问题。
  • Nacos服务端支持支持native-image的方式启动,例如GraalVM,修复Nacos服务端通过native-image的方式启动时的问题。
    • 将Nacos服务端的jdk依赖版本升级只jdk17,并解决升级后运行的兼容性问题;
    • 将Nacos依赖的spring boot版本,升级只spring boot3,并解决升级后的运行兼容性问题和依赖冲突问题;
    • 通过native-image的方式编译对应运行执行文件,能够启动并稳定运行;
    • 需要解决Nacos服务端通过Java native启动后,在运行中遇到的问题,保证Nacos的功能正常;
  • 修改对应的部署官方文档说明;

能力要求

  • 熟悉Java编程语言
  • 熟悉Java native运行和编译机制
  • 熟悉至少一个Java native的主流实现,比如GraalVM
  • 熟悉spring生态、原理和使用
  • 熟悉Markdown

Open Source Promotion Plan is a summer program organized by the Institute of Software Chinese Academy of Sciences and long-term supported by the Open Source Software Supply Chain Promotion Plan. It aims to encourage college students to actively participate in the maintenance and development of open source software, promote the vigorous development of open source software communities, and build the open source software supply chain together.

Nacos will join The Summer 2024 as the mentoring organization.

Background

native-image is a new feature introduced with JDK 17 in Java, enabling Java code to be pre-compiled into a binary file—a native executable. A native executable only includes the code required at runtime, that is, application classes, standard library classes, the language runtime, and statically-linked native code from the JDK, to improve Java application startup and runtime efficiency.
With the maturity and promotion of Spring Boot 3, which supports Java native-image running, an increasing number of applications have begun to launch in the native-image form. The Nacos community has seen a surge in demands for Nacos to support native-image execution, e.g., #9997 ,#11402, etc.
Therefore, through the Summer of Open Source, the Nacos community hopes to enable both Nacos’s Java client and server to support native-image, to increase Nacos's startup speed and run more efficiently while meeting the community's needs.

Target

Enable both the Java client and server of Nacos to start and run stably via the native-image technology, aiming to improve Nacos's startup speed and efficiency.

Difficulty

Advanced

Mentor

Jianwei Wang
[email protected]

Output Requirements

  • Nacos Java Client supports startup via native-image, e.g., through GraalVM, fixing issues encountered when the Nacos client starts in the native-image form.
  • Nacos server-side supports startup via native-image, e.g., GraalVM, resolving issues encountered when the Nacos server starts in the native-image form.
    • Upgrade the JDK dependency version of the Nacos server to JDK 17, and address post-upgrade compatibility issues.
    • Upgrade Nacos’s dependency on Spring Boot to Spring Boot 3, and solve post-upgrade runtime compatibility issues and dependency conflicts.
    • Compile corresponding executable files via native-image for startup and stable running.
    • Address issues encountered in the running of the Nacos server after starting via Java native to ensure Nacos's functionalities work as expected.
  • Update the corresponding official deployment documentation.

Technical Requirements

  • Proficient in the Java programming language
  • Familiar with Java native runtime and compilation mechanisms
  • Familiar with at least one mainstream Java native implementation, such as GraalVM
  • Familiar with the Spring ecosystem, its principles, and usage
  • Proficient in Markdown
@KomachiSion KomachiSion changed the title [Summer 2024] Nacos Server 升级 spring boot3 依赖 [Summer 2024] Nacos 支持 Java native-image 运行方式 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant