Dubbo’s structure, process description and design meaning mentioned in the previous section are actually Dubbo’s HelloWord. The following highlights [Dubbo general configuration]. Source: github.com/limingios/n…

Configuration profile

Red is used by both Cosumber, which is the application, and Proivder, which is the application. Both providers and consumers should provide application to tell us the name of the program. Registry is connected to our registry, and Monitor is connected to the monitoring center, which tells us the real-time status of providers and consumers, how many times they are called, and the time spent for each call.

  • Provider, the provider

The protocol protocol must be provided before it can be invoked by consumers. An RPC framework must have two parts: communication and serialization. The default communication for Dubbo is dubbo, serialized Hession2. A service is used to expose the service. Both providers and services use the timeout period. The provider is public.

Reference means to register with the registry and tell the registry that I need the providers of these services and make a match with the providers. The match succeeds in obtaining the service, creating the service, and turning it into a remote call object.

Methods and parameters are obtained through the service method level configuration, looking at the larger picture to make it easier to understand Dubbo.

  • provider

Dubbo.apache.org/zh-cn/docs/…

  • Positioning properties

The location attribute refers to all the identifiers that the consumer matches with the provider, which have the following attributes in total

Interface: indicates the interface name. Group: indicates the interface group. Version: indicates the interface version

1. In Dubbo, the interface + service group + version number uniquely identifies a service

In the actual development, try not to use the interface version number, but use the way of grouping, divided into test group, development group, production group, so that the development of different. Version =”*”

2. The XML configuration

Dubbo.apache.org/zh-cn/docs/…

3. Why can the server also set the timeout period and retry times? Shouldn’t they be set on the client?

Official introduction:

PS: The best way to learn dubbo is to watch the API, there must be some old people say that Dubbo has annotations, why still stay in XML, too low, no, you want to expose the service, XML is not easier to manage, you are not restful, some service classes are best to use XML.