Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to carry out remote debugging and cloud joint debugging of SAE in Serverless

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces how to carry out remote debugging and cloud joint debugging of SAE in Serverless. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

After studying in the previous course, I believe you already have some understanding of Serverless Application engine (SAE). SAE is an application PaaS platform based on container and kuberneters. In the Serverless scenario provided by SAE, we no longer need to pay attention to the operation and maintenance of the underlying resources, only the business logic of the application itself. However, we usually need to use the debugging function in the development and testing phase. therefore, in order to facilitate user debugging, we provide remote debugging function, which only supports remote debugging of Java programs.

Remote debugging principle of Java remote debugging

As we all know, our Java programs run on the Java virtual machine (JVM). JVM not only provides cross-platform capabilities for our Java programs, but also provides corresponding interfaces and protocols to facilitate remote debugging. There is a system called JPDA in JDK to standardize and support the debugging of Java programs. In this system, the debug initiator and the JVM of the debugged program are supported by JDI and JVMTI modules respectively, and JDWP is responsible for communicating with each other between the two interfaces.

Thus it can be seen that the essence of remote debugging is that two JVM keep communicating through a connection, the program being debugged as a server listens to debug instructions on a specified port, and the debug initiator is used as a client connection target port to send various debugging instructions and receive debugging status.

Now that we know the principle of remote debugging of Java programs, how to implement remote debugging of Java applications deployed in SAE?

Java remote debugging in SAE

First of all, the Java application deployed in SAE needs to enable debug mode first, so you need to add relevant startup commands when deploying the application. In addition, since the application of SAE cannot provide public network access by default, a SLB is required to provide public network access. After the above two are set, you can finally get a debugger to use IP and port, set this IP+ port to IDE and you can start remote debugging.

Note: the above operations can be found in the [practical demonstration] section of the article.

End-to-end cloud joint survey

In addition to remote debugging, end-cloud joint debugging is also a very important function for micro-service applications.

In the process of development and testing under the micro-service architecture, we often encounter the need to launch a new service or update a version of an old service. If there is no end-to-end joint debugging, we can only test the test environment before launching the production environment. However, there are usually differences between the test environment and the production environment, so that some hidden problems can not be found in time.

With the end-cloud joint debugging feature, before the official launch, we can directly implement the mutual invocation between the local service and the service deployed in the cloud, which makes it easier for us to debug closer to the actual production environment.

First of all, the services deployed on SAE are isolated from the local network, so you need to purchase an ECS to act as a springboard under the same VPC. With the help of this springboard, we can complete the registration and discovery of local services in the cloud registry through the plug-in of IDEA. Finally, the end-cloud interconnection can be completed and the end-cloud joint adjustment can be carried out.

So much for the remote debugging and cloud debugging of SAE in Serverless. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report