(a) Follow me to learn springmvc+dubbo-profile

Source: Internet
Author: User
Tags zookeeper wsdl

Summary:

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 invocation of the Dongdong, Frankly, it's a distributed framework for remote service invocation (say goodbye to the WSDL in WebService mode and register on Dubbo in the way that the server and the consumer)

    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 invocation of the east, plainly is a remote service invocation of the distributed framework (farewell to the Web WSDL in service mode, registered on Dubbo in the form of a server and consumer

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 Dubbo frame composition is as follows:

Node role Description:

Provider: The service provider that exposes the service.

Consumer: Invokes the service consumer of the remote service.

Registry: Registration Center for service Registration and discovery.

Monitor: The monitoring center of the call times of the statistics service and the call time.

Container: The service runs the container.

I think it's a very good, well-defined character. Depending on the status of each node role, you can determine if the service is healthy.

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 been measured, we system a page needs to be 5 times the interface, would like 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 it.

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)

Let's take a step-by-step anatomy Dubbo How to use

Please continue to follow the "Follow me to learn Dubbo-zookeeper Registration center installation (2)"

Core technologies: Maven,springmvc MyBatis Shiro, Druid, Restful, Dubbo, Zookeeper,redis,fastdfs,activemq,nginx

    1. Project Core Code structure

(a) Follow me to learn springmvc+dubbo-introduction

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.