Dubbox

1.Dubbox is a distributed service framework. Dubbox is committed to providing high-performance and transparent RPC remote service invocation solutions, as well as SOA service governance solutions. Simply put, dubbox is a service framework. If there is no distributed requirement, it is actually unnecessary. Only when it is distributed, there is a requirement for a distributed service framework like dubbox , and it is essentially a service call. Dongdong, to put it bluntly, is a distributed framework for remote service calls.

 

 

The figure shows the flow chart of Dubbo's program operation.

(1) When a service is started, that is, the producer will register in Dubbo's registry.

(2) The consumer will go to the registry to subscribe to the service before calling, and will wake up the consumer when the service is started.

(3) The consumer calls the producer after waking up

(4) During the consumption process, it will be recorded by the monitoring center

 

2. Use:

The official recommendation is to use the zookeeper registry. The registration center is responsible for the registration and lookup of service addresses, which is equivalent to a directory service. Service providers and consumers only interact with the registration center at startup, and the registration center does not forward requests, so there is less pressure.

 (1) Install the zookeeper registry in the Linux system

(2) Combined with the spring container to manage, configure the following in the configuration file:

    Producer configuration:

1 <dubbo:application name="dubboxdemo-service"/>   
2 <dubbo:registry address="zookeeper://192.168.25.129:2181"/>  
3 <dubbo:annotation package="com.hero.service" />

    Consumer configuration:

1 <dubbo:application name="dubboxdemo-web" /> 
2 <dubbo:registry address="zookeeper://192.168.25.129:2181"/> 
3 <dubbo:annotation package="com.hero.controller" /> 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325276092&siteId=291194637