Today, some students are asking how to do when they encounter a bottleneck in learning Dubbo. Some things just feel right there, but they just can’t touch them and feel confused. Today, I would like to tell you how to break through this bottleneck

My name is Zhou Yu, a teacher from Luban University. I have ten years of experience in Internet e-commerce and Internet finance. I have rich experience in system architecture design, system performance tuning, high concurrency SEC system, open source projects and so on. He used to be senior development engineer of Ant Financial, senior architect of Dianping, source contributor of open source framework Dubbo and gold medal lecturer of Luban University.

Let’s get down to business: DubBo

Apache Dubbo (incubating) | ˈ d ʌ b goes ʊ | is a high-performance, lightweight open source Java RPC framework.

What is the RPC

Baidu: Remote Procedure Call (RPC) — Remote Procedure Call, which is a protocol to request services from Remote computer programs over the network without understanding the underlying network technology. The RPC protocol assumes the existence of some transport protocol, such as TCP or UDP, to carry information data between communication programs. In the OSI network communication model, RPC spans both the transport layer and the application layer. RPC makes it easier to develop applications including network distributed multiprograms.

Remote Procedure Call (RPC) is a computer communication protocol. The protocol allows a program running on one computer to call a subroutine on another without the programmer having to program for this interaction. If the software involved uses object-oriented programming, remote procedure calls can also be called remote calls or remote method calls.

Six characteristics of Dubbo

High-performance interface oriented RPC invocation: Provides high-performance proxy-based remote invocation capabilities. Services are interface-granular and shield developers from the low-level details of remote invocation.

Intelligent load balancing: Multiple load balancing policies are built in to intelligently sense the health status of downstream nodes, significantly reducing call delay and improving system throughput.

Automatic service registration and discovery: Supports multiple registry services and real-time awareness of service instances.

Highly extensible: Following the design principle of microkernel + plug-in, all core capabilities such as Protocol, Transport and Serialization are designed as extension points, and both built-in and third-party implementations are treated equally.

Traffic scheduling during running time: built-in routing policies such as conditions and scripts. By configuring different routing rules, functions such as grayscale publishing and priority in the same machine room can be easily realized.

Visual service governance and O&M: Provides rich service governance and O&M tools: Queries service metadata, service health status, and call statistics, delivers routing policies, and adjusts configuration parameters in real time.

This is before DubbO

After using DubbO

Can you compare the changes before and after? I have summarized a few points, you can have a look:

  • Service invocation address transparency with Dubbo *
  • After using Dubbo, the service returns the argument public *
  • Service Http request method transparency with Dubbo *
  • Dubbo makes service calls to developers more transparent and faster

Handwriting simulates Dubbo

  • Provider module: provide API, implement API, expose (start Tomcat,nettyServer), service local registration, service registry registration *
  • The Consumer module: retrieves the service address from the registry with the interface name and invokes the service *
  • Registry module: Saves service configuration information (service name: List) *
  • RpcProtocol module: HttpProtocol based on Tomcat, DubboProtocol * based on Netty
  • Framework module: Framework implementation

Tomcat structure

So what is the Dubbo Ecosystem?

Dubbo’s current capabilities are increasingly inadequate for developers to build complete microservices. Developers lack a complete set of microservices solutions around Dubbo, such as API Gateway, fusing limiting, distributed monitoring and distributed transactions. Developers need to develop their own or research various open source frameworks to build a complete microservices solution around Dubbo, covering all aspects of the microservices development process. All of these projects are evaluated by the Dubbo community, highly integrated with Dubbo, and proven in production (not just alibaba open source projects). We call this Ecosystem Apache Dubbo Ecosystem.

Dubbo ecology introduction

Dubbo ecological components

The L0 layer includes Dubbo’s core RPC and Service Mesh capabilities. The L1 layer includes registration discovery, configuration management, system availability Reliability and Metrics. If L0 and L1 are the core components of the RPC realm, then L2 is closer to the microservices realm at first. L2 layer includes API Gateway, distributed Tracing Tracing, distributed Diagnosis, and distributed Transaction. L3 components are a little more open. Scheduling, Event Driven, Authenthentication, Function and other aspects have not yet been specifically defined, which will be led by the third party community to form an open ecosystem. In the case of Event Driven, the community-led use of RocketMQ, RocketMQ has released C, C++, Python, and Go clients, and supports rapid integration of RocketMQ into Spring Boot as well as the Spring Message specification. Convenient for developers to quickly switch to RocketMQ from other MQ.

“You can think of a Service Mesh as TCP/IP between applications or microservices, responsible for network calls, traffic limiting, fuses, and monitoring between services.”

— Zhou Yu, Teacher of Luban College

Dubbo teaching video: https://www.bilibili.com/video/av79410607

This article is published by OpenWrite!