frame structure evolution

  1. monolithic architecture

All functions are integrated in one project, and the functions are not divided into presentation layer (controller), business layer (service), persistence layer (dao or mapper); high coupling and low development cost

  1. vertical architecture

Functions are deployed separately (vertical architecture is functional splitting), and functions are not split into presentation layer (controller), business layer (service), persistence layer (dao or mapper)

  1. horizontal structure

On the basis of a single or vertical architecture, the functions are split into a presentation layer (controller), a business layer (service), and a persistence layer (dao or mapper)

  1. SOA architecture

Service-oriented (that is, distributed framework) each functional module is deployed as a separate service and registers itself (IP address and port) to the service management center to realize service registration; remote calls between services are made through the service management center (http, RPC, etc. Communication protocol) realizes service discovery and completes calls, such as Dubbo+Zookeper (RPC realizes remote calls)

  1. microservice architecture

RestFul style interface (i.e. http communication protocol, JSON data transmission format); microservice architecture integrates various technical components, such as: gateway (zuul, gateway), service registration center (Eureka), remote call (Feign), load balancing ( ribbon), service fault tolerance (Hystrix) and other five major technical components, such as: SpringCloud (Feign implements remote calls through http)

The difference between Http and RPC two communication protocols:

  1. Both are based on the TCP protocol
  2. http fixed data transmission format (i.e. JSON data format); RPC custom data transmission format
  3. RPC transmission is faster than http, and RPC is based on TCP protocol with less encapsulation, which is closer to the underlying TCP protocol
  4. http Since the fixed data transmission format is not restricted by the development language, different development language systems can communicate with each other through the http communication protocol; RPC customizes the data transmission format, and different systems use the same development language (different development languages ​​have different syntax formats)

Guess you like

Origin blog.csdn.net/zq17665014809/article/details/129426791
Recommended