头图

Preface

Since I used the genuine IntelliJ IDEA, I basically kept pace with the times and updated immediately after a new version was released, which also allowed me to experience the latest and fastest features.

Recently, while wandering around Jetbrains's official website, I saw the 2021.3 EAP version. Try it right away.

What makes me excited is that the 2021.3 version has added a series of functions for cloud development.

The so-called cloud development refers to a light client running locally. All code storage, code compilation, and code execution are remotely located. The local is only for display and editing.

Many things in this era are cloud-based, including cloud computers, cloud phones, and cloud games. I have always been looking forward to a cloud IDE, although I know that vscode is open source and has a corresponding cloud platform. But I said that IntelliJ IDEA is the ceiling of Java development IDE. No one should refute this.

And this EAP version directly shows that in the future, IDEA can be used as a local IDE and as a light client to connect to the cloud, using the powerful processing power of the cloud to speed up your code compilation and startup speed.

In this cloud, you can specify a server at random, and it can be initialized automatically, which is extremely convenient.

And in this article, let's find out: how this idea cloud is played.

one

2021.3 EAP version is installed, there is an Remote Development option 061973d6c367a4 in the welcome interface:

Click Connect via SSH , and you can see that you can connect to a remote server as a computing resource as long as you use SSH. Like all SSH, fill in your corresponding necessary verification method, here I am using the RSA private key verification method:

After clicking Check Connection and Continue , all subsequent actions are automatically completed by IDEA. Including the installation of remote service processes on your server, initialization and other things. This process can only wait a while.

I waited about 5 minutes for this process. After seeing the successful connection to the remote server, click Project directory to see the file directory on the server, choose one as your working directory.

At this time, the remote process on the server should have been started. I boarded the server and searched for the process of idea. I can find that 4 processes are started on the remote server.

two

After connecting to the main interface, I found that there is no difference between the basic and local ones. It's just that there is an additional real-time up and down speed indicator in the lower right corner. And a ping value. Children's shoes who have played mobile games should know what the ping value is. The lower the ping value, the lower the delay. As you can see in the figure below, the delay between my local and server is 22ms. For children's shoes with a little concept of this value, you should know that this ping value basically does not feel the delay.

Next we will feel the remote compilation.

I created a springboot web project. Of course, the created code is all on the remote end, and the local is just an editing interface.

Run the mvn clean package command. It should be noted that the maven command is not executed locally at this time, it is already remote, provided that the remote server has installed maven and configured the system path.

The whole process is not much different from the local one. The running results are as follows, which still includes the time to download springboot related dependencies from the central warehouse + compile and package. Even I think it is faster than the locals.

By the way, when testing here, the configuration of the remote server is 8-core 64G memory.

Next, I added a controller to the demo project. Run this project directly.

It runs very fast. The configured port number is 8989.

If we usually want to access the controller, we will definitely access 127.0.0.1:8989, but this operation is also running remotely.

I checked the remote process and port number, and indeed a thread was opened on the server, the port number is 8989

Then there is no problem to use the public network address of the server to access.

Even debug is exactly the same as the local one, there is no sense of disobedience

Basically, you don't need to deploy on the test environment, and start directly locally, which is equivalent to deploying a test server. The local resources are not used yet.

When other services are called, the local debugging can be done directly. Do not open remote debug yet.

Of course, the above is purely personal joking, the test environment deployment process is still needed. This is just to illustrate that this kind of debug like local mode is indeed better than remote debug -Xrunjdwp

Summarize

Throughout the experience, it can be said that the operation mode is exactly the same as the local one, but the computing and storage resources are at the remote end. And in the process of my experience, there was basically no place that made me feel stuck, as silky and smooth as the local.

Some children's shoes have low local configuration, and usually start to get stuck after opening a few IDEA windows, so you can use the company's high-performance server as a remote. Use the high performance of the server as a computing resource. There should be no lag when opening dozens of light clients locally. There is no need to change the computer, and the magical operation to solve the idea lag problem immediately.

Because this version is only an EAP version, the official document also says that there may be unstable abnormalities during use. So I personally look forward to the official version of 2021.3.

Maybe in the future, whether it is a mobile phone, a pad, or a lightweight configuration computer. As long as we open the light client of idea and connect to the powerful cloud server, whether it is compilation, startup, or loading, it is extremely fast. It won't happen again. It takes 20 minutes to compile and 10 minutes to start.

I am Bo Saidong, an open source author and content blogger, and I love life and sharing. If you are interested in my content, please forward it, like it, and follow me.

image.png


铂赛东
1.2k 声望10.4k 粉丝

开源作者&内容创作者,专注于架构,开源,微服务,分布式等领域的技术研究和原创分享