SpringCloud study notes 1-- site architecture evolution

SpringCloud Chinese document: https: //www.springcloud.cc/spring-cloud-dalston.htm

1, site structure evolution: traditional architectures (single-point applications) -> distributed architecture (project-split) -> SOA architecture (Service Oriented Architecture) -> Micro Services Architecture

(1) Traditional architecture is actually SSH architecture or SSM architecture, belonging to a single point applications, the entire business module will be developed in a project,

          Divided mvc architecture, it will split control layer, business logic, database access layer.

  Disadvantages: generally only suitable for one person or a small team of developers. Coupling is too high, leading to service once a module is not available, could affect the entire project.

 

 (2) distributed architecture based on the traditional architecture of evolution, the traditional project to project modules split into multiple members n projects, each project has its own separate databases, separate redis etc. (various projects called by RPC remote communication).

    Such as: there are 100 developers are developing in the same project, the question may arise: Code conflict, task allocation is not good, easy conflict issues;

    Distributed architecture with traditional architectural differences: the more detailed sub-project size, suitable for Internet companies began to slowly develop, reduce the degree of coupling.

 

(3) SOA architecture is based on a distributed architecture of evolution. It represents service-oriented architecture, commonly known as a service. It can be understood as the business logic for the development of the common business code extracted, providing interfaces to other calls. Rpc communication using remote calls between services and technology services.

  Service concept: the common business logic split, split into separate projects for deployment, not the view layer, the service concept to understand interface.

  RPC remote call technical framework: httpclient, springcloud, dubbo, grpc and other core technology underlying socket or netty achieve.

  SOA architecture features: SOAP-based underlayer or the ESB (message bus) implemented using HTTP or the underlying protocol Https heavyweight + xml data exchange format (xml format json subsequent alternative format) for communication.

  Http protocol is the use of the underlying WebService + xml (soap), RPC applications two or more remote call. SOA architecture and service-oriented architecture, soap is a mixture of simple http + xml object protocol.

  SOA architecture Disadvantages:

       1) dependence and centralized service discovery mechanism;

       2) SOA architecture using soap protocol, transport protocol xml compare broadband take up the entire xml message has a very large redundant data, so a lightweight way to replace xml json packet transmission in the micro-service architecture;

       3) Service management is very confusing, lack of service facilities, inadequate management and governance.

 

(4) micro-service architecture and SOA architecture difference:

      Micro rpc remote service invocation framework is the core: service governance ---- registry.

        1) micro-services architecture based on SOA architecture of evolution, inherited the advantages of SOA architecture, SOA architecture ESB remove the message bus service in the micro-architecture, using restful style provided API, which is transmitted ➕json http protocol format.

        2) micro Services Architecture SOA architecture will be more than fine granularity, professional people to do professional things (more focused). The purpose is to improve the efficiency of each service and between services independently of each other, each service must be deployed independently (docker, independent database, independent redis), micro-services architecture to embody lightweight.

       3) may share data storage occur SOA architecture, micro-services emphasize each individual database services are, independently of each other to ensure each service and between services.

       4) Project embodies features: Micro Services Architecture SOA architecture is more suitable than the Internet company agile, fast iterative version, because more granular.

 

     

 

 

2. Why use SpringCloud

   At present, it is a relatively complete solution framework for micro-services, unlike other rpc remote invocation framework, only to solve the problem of a micro service. Springcloud can understand the micro-micro-stop service to solve access.

Service Management: Ali Baba and open source dubbo Dangdang expanded on its basis dubbox, Eureka, apache the Consul.

Distributed center configuration: Baidu of disconf, Netfix the Archaius, 360 of QConf, SpringCloud, ctrip Apollo.

Distributed Mission: xxl-job, elastic-job, springcloud the task and so on.

Service Tracking: Jingdong hyra, springcloud the sleuth, etc.

Micro service, the center distributed configuration, distributed lock, distributed tracking, distributed services management, task scheduling of distributed platforms.

Published 25 original articles · won praise 8 · views 10000 +

Guess you like

Origin blog.csdn.net/gonghua0502/article/details/103234707