Micro Spring Cloud Services Development: Getting Started, Advanced and source code analysis - 1.4 Spring Cloud enhanced ecological

1.4 Spring Cloud enhanced ecological

1.4.1 Spring Cloud Distributed Transaction

In the case of micro-services in full swing, more and more projects began to try to transform into micro-service architecture, micro service that is to bring the convenience of project development, and improve the transport and network maintenance difficulty unreliable probability. Spring Cloud framework built using micro Services Architecture, which is bound to ponder the cause of distributed transaction processing.

1.3.2 Spring Cloud 与 Dubbo

Dubbo often be compared with the Spring Cloud, in fact, speaking from the background, is derived from Dubbo team Ali, Alibaba service is the core framework of governance, and is widely used in various member sites Alibaba Group; Spring Cloud is derived from Spring team, it is a product of Spring Source, a powerful endorsement Spring community is arguably the most influential business organization Java, in addition to Spring Source, there are Pivotal and Netfix is ​​its strong backing and technical output. Which open source Netflix's entire suite of micro-services architecture is the core of Spring Cloud. Speaking from the location, Dubbo is a high performance Java RPC framework; and Spring Cloud is a complete micro-service solutions.

Not to really develop a series of such components on Spring Cloud essence, it is only on the basis of existing open source components on the design of a unified set of specifications or the interface, so that these components can access Spring Cloud system , thereby enabling seamless handover underlying implementation. Services such like, may be used in the Eureka Netflix also can be seamlessly switched to the open Alibaba Nacos.

Dubbo and Spring Cloud is not incompatible, in August 2019 after the Spring Cloud Alibaba become a top graduate project from Apache, Dubbo ecology and ecological Spring Cloud has mutual integration, making calls between micro and services along with a RESTful Dubbo ability to call, so that no intrusion on business code, no perception. In the thirteenth chapter of this book will explain in detail the use and integration of Dubbo Spring Cloud, and how while providing the ability RESTful calls and Dubbo.

1.3.3 Spring Cloud 与 gRPC

gPPC is Google open source a high-performance, general-purpose RPC framework. Like other RPC, the client application can directly call the remote service method, the same as if calling a local method. It hides the underlying implementation details, including serialization (XML, JSON, binary), data transmission (TCP, HTTP, UDP), anti-serialization, etc., developers only need to turn off from the business itself, without the need to focus on RPC technology detail.
Micro-service architecture style, each micro service runs in its own process, and the use of lightweight communication mechanism, usually HTTP RESTFUL API. These services are around operational capacity to divide, build, and deploy through a fully automated system. These services can be written in different languages, and different data storage technologies, in order to ensure a minimum of centralized management. But under normal circumstances, HTTP KeepAlive feature does not open, that is, short connection, you need to establish a TCP connection for each request, which makes it very inefficient in time-consuming. Provide external RESTAPI is understandable, but if carried out between the internal service calls or the use of HTTP will be very poor performance, Spring Cloud using Feign internal service calls the default, while using Feign underlying HTTP protocol calls between the service. Spring Cloud official program does not provide a service call outside RESTAPI, existing service calls more efficient internal scheme is GRPC.

1.3.4 Spring Cloud given Motan

Motan is a java-based RPC framework developed by Sina microblogging open source. Reliability through Weibo production verification. In addition to conventional point to point calls, Motan also provides service management features, including automatic discovery service nodes, removal, high availability and load balancing. Motan has good scalability, the main module provides a variety of different implementations, such as support for multiple registries, support for multiple protocols rpc. Supported by an integrated spring configuration, no additional coding to provide a distributed capability for the service call. Support integration consul, zookeeper and other service components configured to provide a clustered environment service discovery and control capabilities. Support for custom dynamic load balancing, traffic shaping across the room scheduling capabilities and other advanced services. It is optimized based on high concurrency, high-load scenarios to protect the production environment RPC service availability. From the architecture point of view, and Dubbo are very similar. However, market share and visibility less than Dubbo, but unfortunately, Dubbo too much java, compatibility with other languages ​​in general, then it shows a big advantage Motan is, Rpc framework for cross-language, in addition to java, but also support PHP, Go, Lua calls between each other and so on.

Published 151 original articles · won praise 1340 · Views 130,000 +

Guess you like

Origin blog.csdn.net/meteor_93/article/details/104020023