Nowadays, it’s not surprising how many new concepts or products are short-lived. We are all curious and full of expectations for an unknown thing, just as you suddenly learn that you are going to be a father and are full of expectations for the arrival of a child, there is no parent who does not want their child to be excellent.

Maybe you don’t expect a child from a poor family to look like, IQ, and how much he can achieve in the future, which we don’t care about. But I think those who like to follow celebrities must be curious about whether their idols’ children look like them.

This, perhaps, is the protagonist aura.

Spring Native is the child of such an excellent family. When it is still immature, our consciousness has accepted its excellence. There is no denying that it was created by its fathers with great goals, and its future is known. But it remains to be seen whether it can achieve the same results as Spring Boot.

I saw some hot spots about it recently, some bloggers writing articles, but let me feel to write these articles blogger perhaps don’t understand myself Spring Native long what kind, is to chase a hotspot, translation of foreign video, or the official document, start time, compile time consuming, comparing to the memory, the compiled file parameters such as volume, So I don’t know much from their articles. Of course, I’m here to get some heat, too.

Many people like to boast that domestic cars are getting better and better, but act honestly. One praises BYD N.B while buying a Tesla. One side boast Huawei for China, while ten thousand dollars to catch up with the latest iPhone. So it’s one thing to be good, it’s another thing to have a market reaction to it.

Beautiful girls are not always popular, but interesting soul is.

According to the official documents of Spring Native, I recognize its excellence, and I will continue to pay attention to it. Maybe I will use it in appropriate projects in the future. At least from the current understanding, I will not pay for performance only. Secondly, due to the maturity of the current project, we still lack the support of some cloud native components.

The birth of Spring Native has its aura, which is exactly the same as the original Spring WebFlux. However, after several years, it is obvious to all whether Spring WebFlux has become popular. Is WebFlux not good enough? Of course not. I have also used WebFlux+R2DBC+Lettuce to develop a push micro service and a gateway, but I will not use it to develop business projects, its advantages are not enough to ignore its disadvantages, so it is not destined to become popular in business development, not now, not in the future. As for its advantages, don’t other frameworks and programming languages have them?

Docs. Spring. IO/spring – nati…

Spring Native provides support for compiling Spring applications to native executables using the GraalVM native-image Spring Native supports compiling Spring applications into Native executables using the GraalVM Native image compiler.

Spring Native uses GraalVM’s Native Image compiler to compile JVM bytecode into executable Image files (machine code) at compile time and run on GraalVM outside of the Hotspot VIRTUAL machine (write at compile time), indicating that it will abandon some runtime features for performance. For example, lazy loading of classes (common examples are remote class loading, Tomcat dynamic deployment WAR), reflection, dynamic proxy, Java Agent.

About GraalVM: The Article about GraalVM www.sohu.com/a/375404869…

While Spring Native can support AOP through compile-time processing to turn dynamic proxies into static proxies, not all dynamic proxies can. I remember that the adaptive SPI mechanism in the Dubbo framework required the generation of the target proxy method body based on the request parameters, using dynamic bytecode technology. Also, CGLIB will not be supported, which means that CGLIB Bean property copies will not be used, @async and @scheduled non-implementation interfaces will be changed to use interfaces, and reflection will need to be configured statically.

Secondly, in microservices, some call chain tracking platforms we currently use need JavaAgent to achieve no code intrusion, dynamically modify the class bytecode insert buried code and reload the class bytecode. With Spring Native, these JavaAgents will be abandoned, and these call chain tracking platforms will either choose to support piling at compile time or forgo code intrusion.

Of course, Spring Native is aimed at the cloud Native market, and Golang, which has a presence in cloud Native, doesn’t support this feature, but that doesn’t stop developers and organizations from embracing it. Instead of JavaAgent, service grid technologies such as Istio that target traffic control, retry, monitoring, link tracing, load balancing, dynamic routing down to the infrastructure layer will replace JavaAgent. But… Links between processes are only supported, links between processes are not cared about, but… Is it necessary to care? Too many buried points can only affect performance.

With the development of Service Mesh and FaaS technologies, it is believed that Spring Native will be used by many organizations. Spring that supports GraalVM Native Image has the feature of fast startup and better supports FaaS. Similarly, building smaller container images is better suited to cloud native, reducing runtime memory footprint will also reduce the organization’s costs.

Therefore, although Spring Native is similar to Spring WebFlux in my opinion, at least it is not the same as Spring WebFlux. Although both of them aim to improve performance, WebFlux forces developers to change existing programming methods and has strong API intrusion, which is bound to not be widely accepted. Spring Native supports Native mirroring just to keep Spring features, and developers don’t have to pay a lot of learning costs to accept it.

Maybe this is a more intuitive metaphor. WebFlux is more like Window Phone system, which needs the support of more developers and organizations to build the ecosystem, while Spring Native is more like hongming system, which adopts adaptive Android applications to inherit the existing Android ecosystem. If the theme is not changed, You hand your phone to your friends and they may not be able to tell it’s a Hongmeng operating system.

But even so, there are many unknowns.

GraalVM isn’t the only thing Spring Native supports right now, Quarkus is on the track with GraalVM, and it’s much lighter, but developers aren’t paying for it either, because it’s outside of our comfort zone, so Quarkus isn’t popular enough to measure Spring Native’s popularity. As mentioned earlier, Spring Native also has a halo.

Last but not least, will you choose Spring Native for performance or switch to a language like Golang? I guess those who choose Spring Native are at least nine layers above, including me. While Golang is simple, it doesn’t surprise me as much as Java does, creating a lot of “art,” art.

Original recommendation:

  • “Using Spring WebFlux + R2DBC to build Message Push Service”
  • “A deeper understanding of simplicity might make reactive programming easier to get started with.”