Hello, I’m Why.

What did you do this past weekend? Did you roll it up or lay flat?

I actually wanted to lie flat, but I came across a website for learning, and I was attracted to it, and I rolled up with it.

It’s a really good site, good stuff, to share, so I decided to expose it.

Before I introduce this site, let me ask you a question:

You know Arthas, a Diagnostic tool for Java programs?

I believe that most of the students are aware of it, but also a large part of the students are just in the stage of “paper talk”.

I haven’t actually done it myself.

Why is that?

I guess when you first learned about Arthas, you were attracted to its cool operations and pages.

Thought: My god, so 6?

I was excited to try it out, and it turned out that I needed to build my own Demo, throw it up and running on the server, and then install Arthas on the server to analyze it.

This set of operations is fine for most people.

But there are still a large number of students, do not have a server of their own.

It’s hard for a smart woman to cook without rice.

The first step got stuck.

Have the heart to practice, but the condition is limited.

So the whole thing was stranded and put on hold. I forgot about the various operations of Arthas because I didn’t actually run it.

No Demo, no server, no server with a good environment installed.

This kind of problem often appears, is also the study encountered in the “last kilometer” problem.

The site I came across was designed to solve the last mile problem.

It may not be perfect yet, but at least the support on Arthas is impeccable, truly hands-on.

So what is a website?

Here’s the site:

https://start.aliyun.com/

Zhixing Hands-on Lab is a cloud native open source technology experience platform created by Ali Cloud.

It comes with its own runtime environment.

Users only need to care about the content of the tutorial itself, and do not need to waste time preparing for the cumbersome runtime environment. All experiments were run in a container with a pre-prepared runtime environment.

It has an immersive learning experience.

Interactive document, terminal, editor three Windows in a browser page, no need to copy and paste in multiple Windows back and forth.

It can automatically execute commands and automatically modify code with one key.

The document can be interactive in real time. You can automatically execute commands and automatically modify code by clicking the mouse. Alternatively, you can manually enter the value in the terminal or editor to view the effect.

I know, it looks a lot like an advertisement.

But I swear, I really do have tap water. I really recommend it.

Do it. Do it a lot

Zhixing Hands-on lab, look at the name to know that the emphasis is “xingzhi unity”, is “hands-on”.

I have seen an article by Ali called “I see the growth path of technology people”.

The article proposes a 721 original:

70% learn by doing, 20% learn from others, and 10% learn by themselves

But in fact, we have to admit that self-study occupies a considerable proportion.

And when we study independently, there is a common problem is: only look, just want to, basically do not do.

What I remember most about doing is when I read this book:

I remember reading this book just over a year after I graduated.

At that time, I thought the technical books were quite expensive, so I bought them together with my colleagues. Each of us paid half the money, and the books were put in the office for everyone to look at.

I used to read it whenever I could.

The first time I read it, I was like, wow, this is a really good book. It’s full of things I don’t know.

But not long after reading it, I encountered a problem and thought for a long time: eh, this problem seems to have been mentioned in the book, why can’t I remember it?

So I asked my colleague: what do you think of this book? I turned every page of the book a while ago, but now I can’t remember a lot of things.

He told me: First of all, read more. There is still too much information in the book for you. It is normal to read it once and not absorb it completely. By the way, did you tap all the hands-on examples in the book? I went through them all, and I got all kinds of craters. The impression is naturally a little deeper.

It can be said that a language point to wake up the dream, I really have not been the practice.

Not only did I not practice it, I even glanced at the specific commands of the operation part in a few eyes, because I thought it was not important.

Later I read again, read this time, I made a few servers, followed the book, the above command to tap again.

Much, much slower, but much, much more absorbed.

To this day, years later, I remember running into my office on weekends to look at the book. I remember all the weird problems I had when I was building clusters from the book. I remember the 16,384 slots and the Redis-trib.rb that I couldn’t get going.

I remember a few years later, the interviewer asked me: Do you know anything about Redis clusters? Have you ever done clusters yourself?

Of course I remember, after all, the only one year of experience of the young man before the head of the scalp to build a cluster, the mentality has been broken several times.

There is a recent period of time on and off to see “MySQL actual combat 45”, “how MySQL runs”, “high-performance MySQL”.

In fact, there are a lot of examples, especially 45, good thing, the teacher is based on the case to tell.

I read the time also read slowly, anyway, no matter understand or not understand, start to open a few Windows, and then the experiment of SQL ready, follow the teacher step by step.

In short, do it. The only way to learn a new skill is to do it.

Learning by doing means doing and learning by doing.

However, most of the time was spent on the preparation of the environment, resulting in a slightly low efficiency.

And this site, in part, solves that problem.

Knowledge and practice hands-on laboratory

Back to zhixing Hands-on Lab, take you to the website.

To be honest, there is not much on the site so far, which took me a weekend to study.

Mainly there are some open source projects I do not know much about, to understand, expand the horizon.

The main is some technology stack under the Ali ecosystem, currently a total of 16 tutorials:

The first diagnostic tool that comes into view is Arthas, one of Ali’s more promising sons.

Push it hard, not too hard.

Arthas is divided into four tutorials, ranging from getting started to getting started.

Next comes the Spring Cloud Alibaba series:

Six small experiments, including distributed configuration, service registration, and discovery, are based on Nacos. Dubbo Spring Cloud is used for RPC calls, Sentinel based flow limiting and circuit breakers, Seata for distributed transactions, and RocketMQ for distributed messages.

Basically covers the main modules of microservices development.

It’s a complete experience.

Of course, there are other RocketMQ, Dapr, Dubbogo, ChaosBlade, K8S tutorials that will not be explained.

You just have to know that these things are in there for now.

Dapr and ChaosBlade may be a little unfamiliar to those of you mentioned above.

Just a little bit.

Dapr stands for Distributed Application Runtime, which translates to Distributed Application Runtime.

It’s primarily for cloud natives.

It is a technology that belongs to the service grid. It is a runtime that supports K8S. The purpose is to better isolate the business and make the business less aware of infrastructure such as middleware.

In fact, it should be the istio architecture.

It’s important to note that Dapr is an open source project initiated by Microsoft, not Alibaba.

Ali is a deep participant and early adopter of the Dapr open source project, which is equivalent to an endorsement of Dapr by a major domestic manufacturer.

ChaosBlade is an open source experimental injection tool of Alibaba that follows the chaotic engineering principle and chaotic experimental model. It helps enterprises improve the fault tolerance of distributed systems and ensures business continuity in the process of migrating to the cloud or cloud native systems.

To quote the description on git:

https://github.com/chaosblade-io/chaosblade/blob/master/README_CN.md

The ecology of the project is as follows:

There are currently many scenarios supported:

For example, there are three experiment scenes in zhixing Hands-on lab:

Anyway, remember one thing about ChaosBlade:

It’s here to destroy. Inject various failures into the system or the environment in which the system is running to test and improve system stability and high availability.

In zhixing Hands-on Lab, in addition to the aforementioned official tutorials, it also supports you to upload your own tutorials.

Here are a few examples of a good place to post a tutorial:

  • Open source and the developer community publishes open source project introduction tutorials to help your community get started
  • Technical book authors publish your experiments with the book in the knowledge and practice, to make up for the technical books can only be read, can not practice the defect
  • Training institutions in zhixing published the course of the first course, with the existing course video, your students can do practical operation in Zhixing

Don’t you think it would be nice if all the experiments I mentioned earlier in Redis Development and Operations were published here?

Learning efficiency must be high again.

Tutorials are one of the core features of the lab.

But it has another big function:

Java Engineering scaffolding with the slogan:

Java engineering scaffolding more suitable for developers in Asia Pacific.

I’m not sure why it’s “more suitable for Asia Pacific”, but it sounds good.

The page looks like this, does it look familiar?

This is the one more familiar to you:

https://start.spring.io/

But with my actual use, I have to say that Ali’s scaffolding is better.

For example, I use Ali’s scaffolding to build when choosing a web project example code:

The project structure is as follows:

And the Web project can run without changing a line of code or even requiring you to start the database.

Because it uses the H2 database:

Once up and running, access the H2 console as follows:

Although I found a few bugs during the running of the Demo project, it was harmless and easy to fix. It was very friendly for beginners.

On this page I also found a project architecture called COLA:

What is COLA?

https://github.com/alibaba/COLA/

I pulled a COLA Demo on the official website and ran it. The project structure is as follows:

Here’s what the official code looks like:

When I see here, I probably understand that there are App layer, Domain layer and Infrastructure layer. This architecture is actually a kind of implementation of DDD idea.

After two short days of understanding, I found that if you want to understand abstract DDD thinking, the COLA architecture is a good place to start.

Arthas tutorial

In front of the introduction of so many things, I still come to take you to practice a, inside the gold tutorial:

In fact, I don’t think this is really necessary, because the tutorial on it is already step-by-step hand to hand teaching.

For example, if you look at this Arthas Basics tutorial, I’ll record a screen for you:

On the left is the operation document, and on the right is the runtime environment. You get what you get. How sweet.

I strongly recommend that you go through all four tutorials and do them yourself.

But the center of gravity can be put in this tutorial:

Check out the 14 experiments in this tutorial:

It’s hands-on teaching. The environment, the scene, the tools are all prepared for you. You just need to focus on how to use the tool.

Take the Arthas Hot Update Code case, which is a common problem in a production environment:

There is a logic problem, I do not want to modify the code, repackage, and then go online process, how to do?

What about Arthas Hot Update?

For example, the following code:

@GetMapping(value={"/user/{id}"})

public User findUserById(@PathVariable Integer id) {

    logger.info("id: {}", (Object)id);

    if(id ! = null && id < 1) {

        throw new IllegalArgumentException("id < 1");

    }

    return new User(id.intValue(), "name" + id);

}

Copy the code

Now an exception is thrown if the requested ID is less than 1. But after going online, we evaluated and found that this place might return a default value, and it would be better not to throw an exception.

Then we can use Arthas to hot-update this code.

The left is after the modification, and the right is before the modification:

This example describes how to modify the code and how to load the modified code using the ClassLoader.

Of course, it would be great if you learned how the hot update works after running it.

Know how to use, master the principle of implementation. Congratulations you, give oneself again set a production case, have more than a bonus point when inadvertently interview.

And, in a whisper, operation SAO.

You can find any tutorial, go to a window, and go to……

For example, I put in a Redis:

It’s also good to use:

It also supports file upload and download:

Well, it’s just fun. Consider yourself familiar with Linux commands.