Build JEESZ distributed architecture 4 -- Dubbo introduction, build jeesz4 -- dubbo

Source: Internet
Author: User

Build JEESZ distributed architecture 4 -- Dubbo introduction, build jeesz4 -- dubbo

1. What is Dubbo?

Dubbo is a distributed service framework designed to provide high-performance and transparent RPC remote service calling solutions and SOA service governance solutions. Simply put, dubbo is a service framework. If there is no distributed requirement, it is not necessary to use it. The distributed service framework such as dubbo is required only in distributed mode, it is essentially a service call,To put it bluntly, it is a distributed framework for remote service calls (farewell to the WSdl in WebService mode and register it on dubbo as a service provider and consumer)
Its core components include:
1. Remote Communication: Provides abstract encapsulation for a variety of Long-connection-based NIO frameworks, including multiple thread models, serialization, and information exchange in the "request-response" mode.
2. Cluster Fault Tolerance: Provides transparent remote process calls based on interface methods, including multi-protocol support, soft load balancing, failure tolerance, address routing, dynamic configuration, and other cluster support.
3. Automatic Discovery: Based on the Registry's directory service, service consumers can dynamically search for service providers and make the addresses transparent so that service providers can smoothly increase or decrease machines.

 

2. What can Dubbo do?

1. Transparent remote method calling, just like calling a local method, requires simple configuration without any API intrusion.
2. Soft load balancing and fault tolerance mechanisms can replace F5 and other hardware load balancers on the Intranet, reducing costs and reducing single points of failure.
3. Automatic Service Registration and discovery, no need to write the address of the service provider to death, the Registration Center queries the IP address of the service provider based on the Interface Name, and can smoothly add or delete the service provider.

Dubbo uses the full spring configuration method to transparently access the application without any API intrusion to the application. You only need to use spring to load Dubbo configurations. Dubbo is loaded Based on Spring Schema extension.

 

3. dubbo Architecture

Dubbo architecture diagram:

 

Node role description:

Provider: exposes the service Provider of the service.

Consumer: the Consumer who calls the remote service.

Registry: The Registration Center for service registration and discovery.

Monitor: the monitoring center that counts the call times and call times of a service.

Container: a service running Container.

I think this is very good, with clearly defined roles. You can determine whether the service is normal based on the status of each node role.

Call relationship description:

0 the service container is responsible for starting, loading, and running the service provider.

1. When the service provider starts, it registers its own services with the Registration Center.

2. When a service consumer starts, the service consumer subscribes to the Registry to subscribe to the desired service.

3. The Registration Center returns the service provider address list to the consumer. If there is any change, the Registration Center will push the change data to the Consumer based on the persistent connection.

4. The service consumer selects one provider for calling Based on the soft load balancing algorithm from the provider address list. If the call fails, selects another call.

5. service consumers and providers, accumulate the number of calls and call time in the memory, and regularly send statistics once per minute to the monitoring center.

Dubbo's fault tolerance is obvious, and performance has not yet been tested. We need to drop an interface five times on a page of our system. We originally wanted to make a cache, but the business relationship was unacceptable, we also need to study the performance tuning problem of dubbo...

4. dubbo usage.

Dubbo uses the full Spring configuration method to transparently access the application without any API intrusion to the application. You only need to use Spring to load Dubbo configurations. Dubbo is loaded Based on Spring Schema extension. If you do not want to use Spring configuration but want to call it through APIS (not recommended)

For more details, click the Source Code address to obtain:Mingli

If you are interested, you can go to the ball ~ Sharing learning technologies: 2042849237

Keep an eye on building a distributed architecture 5-Dubbo console Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.