Before, I posted an article “Tell me why I am optimistic about Spring Cloud Alibaba”, and then a net friend redirected me to this article “Spring Cloud Alibaba, Let’s have one”, and asked me what my opinion was. I briefly talked about it during our chat. Today rest at home, take time to organize content, point the way my opinion, the main or feel this article the composition of publicity, because before the interpretation of this article and some other released to the media since the Eureka 2.0 declared open work to stop, continue to use own risk “is similar to the” wonderful “, Without a real understanding of Spring Cloud and Spring Cloud Alibaba, the reader is likely to misunderstand them and think something like this:
- It makes sense. This thing is crap
- The headline is burning and must be forwarded
Here are some specific interpretations of the article that I don’t think are quite correct:
Point one: Remote RPC calls
Take a look at this reading:
SpringCloud is powered by Feign and the Ribbon by default, providing remote invocation requests and parsing, as well as load balancing. To be fair, if you don’t use these two components, it’s going to look a lot less like SpringCloud, so you can’t replace them. RPC makes a lot of use of dynamic proxies, turning your strings or configurations (because of the ease of network transport) into dynamic interfaces.
You can also write an RPC for integration, and there are many tutorials that teach you how to do this manually.
The dad version incorporates a Dubbo, which is RPC. So as soon as you use this thing, some other key components have to be replaced with the whole set, and components are not called components anymore!
The authors believe that Spring Cloud load balancing and remote calls must use Feign and Ribbon, which is the default implementation of Spring Cloud. If it’s Dubbo, it doesn’t look the same.
Here’s what I think:
Point one: Does Dubbo really look different when it comes to Spring Cloud? If you really look at Spring Cloud Alibaba and understand the abstractions in Spring Cloud Common, this question doesn’t need to be discussed at all. Spring Cloud Alibaba Dubbo is implemented compatible with Feign’s programming model. Interested readers can take a look at Xiao Ma’s case study in the project:
Github address: github.com/spring-clou…
Second point: Feign and Ribbon are not Spring Cloud standards, they are just components in Netflix OSS. For load balancing, you can look at Spring-Cloud-loadbalancer, which is now part of Spring Cloud Common, which is the true standard. There is already a lot of user awareness about Spring Cloud Alibaba’s compatibility with Feign clients when integrating Dubbo.
Github address: github.com/spring-clou…
So, has the author read Spring Cloud Alibaba Dubbo’s plan at all?
Second point: the registry
Take a look at this reading:
Another required component of microservices is a service registry that coordinates the mutual discovery of service providers and callers. The default registry for SpringCloud is Eureka.
The dad version uses Nacos. The update to Nacos is still fairly active at the moment, but there’s really no need to integrate it into a Cloud. Nacos is best distributed independently and maintained as a starter. Developers can selectively integrate or substitute for their own company’s environment. The cost of integrating a component is low, far less than cutting out a bunch of smug features.
SpringCloud can also choose From Zookeeper, Consul, or even Etcd to set up a registry. For now, Consul should be the first choice after Eureka announced no more maintenance.
Consul comes with Dashboard and ACL to see most of the information you care about. In order to be able to integrate into our company’s system, you may develop some back-end management functions for more control. This part is easy to develop, just need to make an interface, directly read Consul data through the API.
Here’s what I think:
First point: the choice of registry. After Eureka is no longer updated, there is no complete optimal solution to choose which one to use. It is reasonable to choose the one suitable for your team (technology stack, use cost), which is the most important point to consider.
Second point: the authors suggest that “Nacos is best released independently and maintained as a starter”. That’s good advice, but I wonder if the author has even seen Nacos. Nacos is currently released independently, and Spring Cloud Alibaba’s support for Nacos is just a way of application of Nacos in client applications for Spring Cloud users.
So, has the author looked at Spring Cloud Alibaba Nacos at all?
Third point: fusing and limiting current
Take a look at this reading:
This has been hyped up as a must-have component of microservices, but ask yourself, this feature can be a dead end for small to medium sized applications. But we’ll do it anyway, because it’s a selling point.
The default component of SpringCloud is Hystrix, which provides different ways of multithreading and semaphore control. Unfortunately, Hystrix has also announced that it will no longer maintain it, and the official recommended replacement is Resilience4J.
Fusing current limiting function is actually very simple, colleagues spent a week to build enough components. This part is designed to be simple to use, preferably in real time through background configuration.
The dad version, Sentinel, came with a backend, but it didn’t integrate with the registry, making it neither fish nor fish.
I’m gonna use Sentinel. I’ll integrate it myself. Use your big head.
Here’s what I think:
First point: I think the author is very lucky to have a colleague who can master fuses, current limiting frameworks and configuration management. But not all teams have people who can do that, so I think having open source projects like this is good for the industry at any time. Just because you don’t have a problem, doesn’t mean you’re useless to others, doesn’t mean the project isn’t good enough.
Second point: for what the author says, there is no integration with the registry. Here neither fish nor fowl, has not been able to Get to the author’s point… Do not know whether to have a bit “for fu neologism strong say sorrow” feeling? Personally, when comparing Hystrix to Sentinel, there are a lot of things that Hystrix does better than Sentinel.
Of course, the real application to their own architecture system, usually need to do some adaptation, custom and other work. But extensions to open source products have never been a core reason to bash open source projects.
conclusion
Now there is a strange phenomenon in the technology circle. Since some technical we-media people began to share how to make money by sharing technology, more and more technical we-media have been born.
And here’s what happens:
- How to handle an interview
- How to become an architect by someone who has never been an architect
- People who don’t make money are sharing how to make money
- People who are not middle class are sharing how to be middle class
- .
There is no denying that we media can make money. However, technical “we media”, which are purely for making money, mechanically copy the money-making methods shared by those big V’s. In order to pursue traffic, they will use exaggerated statements, distorted facts, spread infringing content, and make up stories to win sympathy and other means to get attention and forwarding. This makes the sharing of a lot of technical content less pure, and even leads to misunderstanding of the technical content for readers.
I do not have the ability to control those we media release these false content, but within the scope of my understanding, or try to output some of my understanding. Hope to give these misread content of different voices, can attract the attention of readers, so that we can hope that some of their own thinking.
Of course, I’m not always right, so no matter what you read, keep yourself thinking. When you find conflicting content online, the only way to resolve it is not to choose one side to believe, or to do your own research and test which one is right.
Finally, a disclaimer: I am neither a member of Spring Cloud Alibaba nor an employee of Alibaba. The support for Spring Cloud Alibaba is just a reflection of a programmer struggling on the front line.
If you think what I said is wrong, you are very welcome to comment on it.
Welcome to my long-running serialSpring Cloud Basics tutorial