Dubbo_Concept_Distributed System

1. Distributed basic theory

1.1) What is a distributed system?

Definition of "Principles and Paradigms of Distributed Systems":

"A distributed system is a collection of several independent computers, which look like a single related system to users."

A distributed system is a software system built on the network.

With the development of the Internet, the scale of website applications continues to expand, and conventional vertical application architectures can no longer cope with it. Distributed service architecture and mobile computing architecture are imperative. A governance system is urgently needed to ensure an orderly evolution of the architecture.

1.2), development and evolution

Single application architecture

When the website traffic is very small, only one application is needed and all functions are deployed together to reduce deployment nodes and costs. At this time, the data access framework (ORM) used to simplify the workload of adding, deleting, modifying and checking is the key.

Suitable for small websites, small management systems, deploy all functions into one function, simple and easy to use.

Disadvantages:

1. Performance expansion is more difficult

2. Collaborative development issues

3. Not conducive to upgrade and maintenance

Vertical application architecture

When the number of visits gradually increases, the acceleration caused by the increase of a single application by the machine becomes smaller and smaller, and the application is divided into several unrelated applications to improve efficiency. At this time, the web framework (MVC) used to accelerate the development of front-end pages is the key.

By segmenting the business to realize the independent deployment of each module, the difficulty of maintenance and deployment is reduced, the team is easier to manage, and the performance expansion is more convenient and more targeted.

Disadvantages: Common modules cannot be reused, waste of development

Distributed service architecture

When there are more and more vertical applications, interaction between applications is inevitable. The core business is extracted as an independent service, and a stable service center is gradually formed, so that front-end applications can respond more quickly to changing market demands. At this time, the Distributed Service Framework (RPC) for improving business reuse and integration is the key.

Mobile computing architecture

When there are more and more services, problems such as capacity evaluation and the waste of small service resources gradually appear. At this time, a dispatch center needs to be added to manage cluster capacity in real time based on access pressure to improve cluster utilization. At this time, the Resource Scheduling and Governance Center (SOA) [Service Oriented Architecture] used to improve machine utilization is

Key .

1.3)、RPC

What is RPC

RPC [Remote Procedure Call] refers to remote procedure call, which is a method of inter-process communication. It is a technical idea, not a specification. It allows the program to call a procedure or function in another address space (usually on another machine sharing the network) without the programmer explicitly coding the details of the remote call. That is, whether the programmer calls a local or remote function, the calling code written is basically the same.

RPC basic principles

RPC has two core modules: communication and serialization.

What are the open source RPC frameworks? https://www.jianshu.com/p/aba725bcfc00

One is bound to a specific language platform, and the other is language-independent, that is, cross-language platform.

There are mainly the following types of open source RPC frameworks bundled with language platforms.

  • Dubbo: The earliest open source RPC framework in China, developed by Alibaba and open sourced at the end of 2011, only supports the Java language.

  • Motan: The RPC framework used internally by Weibo was open sourced in 2016 and only supports the Java language.

  • Tars: The RPC framework used internally by Tencent was open sourced in 2017 and only supports the C++ language.

  • Spring Cloud: The foreign open source RPC framework of Pivotal in 2014, which only supports Java language

The cross-language platform open source RPC framework mainly has the following types.

  • gRPC: Google's open source cross-language RPC framework in 2015, supporting multiple languages.

  • Thrift: It was originally a cross-language RPC framework for internal systems developed by Facebook. In 2007, it contributed to the Apache Foundation and became one of the Apache open source projects, supporting multiple languages.

  • hprose: A new lightweight cross-language cross-platform object-oriented high-performance remote dynamic communication middleware licensed by MIT. It supports many languages: nodeJs, C++, .NET, Java, Delphi, Objective-C, ActionScript, JavaScript, ASP, PHP, Python, Ruby, Perl, Golang.

 

 

Guess you like

Origin blog.csdn.net/ZHOU_VIP/article/details/115031574