Introduction to building Springmvc+myabtis+dubbo distributed platform-dubbo

Source: Internet
Author: User

In the previous article, we introduce the construction of the Ant-utils Toolkit for building Dubbo distributed platform-maven, starting today, we enter the core tutorial of the Distributed service project and really use Dubbo to implement the distributed service for Enterprise service.

Before learning Dubbo distributed services, we need to understand the Dubbo service tutorial, I will write about Dubbo service articles quickly help you learn.

    1. What is Dubbo?

Dubbo is a distributed service framework dedicated to providing high-performance and transparent RPC remote service invocation scenarios, as well as SOA service governance scenarios. Simply put, Dubbo is a service framework, if there is no distributed demand, in fact, it is not needed, only in the distributed time, only Dubbo such a distributed service framework needs, and essentially a service call, plainly is a remote service invocation of the distributed framework (farewell to the Web The WSDL in service mode is registered on the Dubbo in the way that the server and the consumer do.

The core part contains:

    1. Remote communication: Provides an abstract encapsulation of various NIO frameworks based on long connections, including multiple threading models, serialization, and "request-response" mode of information exchange.

    2. Cluster fault tolerance: Provides transparent remote procedure calls based on interface methods, including multi-protocol support, as well as soft load balancing, failure tolerance, address routing, dynamic configuration and other cluster support.

    3. Autodiscover: Based on the Registry directory service, the service consumer can dynamically check the XXX provider, make the address transparent, so that the service provider can smoothly increase or decrease the machine.

    4. What can Dubbo do?

1. Transparent remote method calls, just like calling a local method, call the remote method, simply configure, without any API intrusion.

2. Soft load balancing and fault tolerant mechanism, can replace F5 and other hardware load balancer in intranet, reduce cost and reduce single point.

    1. Service autoenrollment and discovery eliminates the need to write dead service provider addresses, the registry queries the IP address of the service provider based on the interface name, and is able to smoothly add or remove service providers.

Dubbo uses a full spring configuration, transparent access to the application, no API intrusion to the application, just load the Dubbo configuration with spring, and Dubbo the spring-based schema extension.

    1. Architecture of the Dubbo

The composition of the Dubbo frame is as follows:

Node role Description:

   Provider: 暴露服务的服务提供方。   Consumer: 调用远程服务的服务消费方。   Registry: 服务注册与发现的注册中心。   Monitor: 统计服务的调用次调和调用时间的监控中心。   Container: 服务运行容器。

Call Relationship Description:

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

    1. The service provider registers its services with the registry when it is started.

    2. When the service consumer starts, it subscribes to the registration center for the services it needs.

    3. The registry returns a list of service provider addresses to the consumer, and if there is a change, the registry will push the change data to the consumer based on a long connection.

    4. Service consumers, from the provider address list, based on the soft load equalization algorithm, select one provider to make the call, if the call fails, then choose another call.

    5. Service consumers and providers, accumulate calls and call times in memory, and periodically send statistical data to the monitoring center every minute.

Dubbo's fault tolerance is obvious, performance has not yet to be measured, we system a page needs to be 5 times the interface, originally wanted to suggest a cache, but the business relationship can not be adopted, but also need to study the performance tuning problem of Dubbo

    1. Dubbo How to use

Dubbo uses a full spring configuration, transparent access to the application, no API intrusion to the application, just load the Dubbo configuration with spring, and Dubbo the spring-based schema extension. If you do not want to use the spring configuration and want to make calls through the API (not recommended), we will step through the use of Dubbo in the later chapters!

Welcome to join me in learning "build Dubbo Distributed platform", I hope you continue to pay attention to the following articles!

Introduction to building Springmvc+myabtis+dubbo distributed platform-dubbo

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.