当前位置:网站首页>Knowledge points related to system architecture 2

Knowledge points related to system architecture 2

2022-06-13 08:46:00 variation8

One 、C/S framework
advantage :C/S The advantage of the architecture is that the client applications and server components of the system run on different platforms On computer ,
Each server in the system can meet the requirements of each component , This shows changes in hardware and software Great adaptability and flexibility , and And it is easy to expand and reduce the system . stay C/S In Architecture , System The functional components in are fully isolated , The development of customer applications focuses on the display and analysis of data , Database services The development of data manager focuses on data management , You don't have to... In every new application To a DBMS Make up code . Distribute large application processing tasks to many low-cost computers connected through the network , To save a lot of money .
shortcoming :
① Development costs are high .C/S The architecture requires high configuration of client software and hardware , Especially the continuous upgrading of software , The requirements for hardware are constantly improving , It increases the cost of the whole system , And the client becomes more and more bloated .
② The client program design is complex . Adoption C/S Architecture for software development , Most of the workload is on the client program design , The client is very large .
③ The content and form of information are single , Because traditional applications are generally transaction processing , The interface basically follows the database field interpretation , It has been determined at the beginning of development , And can not intercept office information, archives and other external information at any time , All the users get is simple characters and numbers , It's boring and rigid .
④ Different user interface styles , It's complicated to use , It is not conducive to the promotion and use of .
⑤ Software migration is difficult . Software developed with different development tools or platforms is generally incompatible with each other , Can't or very Difficult to migrate to other platforms .
⑥ Software maintenance and upgrade are difficult . use C/S The software of the architecture should be upgraded , Developers must be on site Upgrade for client , The software on each client needs to be maintained . A small change to the software ( For example, only one change A variable ), Every client must be updated .
Two 、 Three layers C/S framework
This client is called a thin client (
thin client). Three layers C/S The architecture divides the application system into presentation layers 、 Function layer and data layer .
① The presentation layer . The presentation layer is the user interface part of the system , It is responsible for the dialogue between the user and the system . It is used to check the data entered by the user from the keyboard, etc , Display the output data .
② Functional layer . The function layer is also called the business logic layer , It is to program the specific business processing logic . for example , The contract amount shall be calculated when making the purchase contract 、 Configure the data in a predetermined format 、 Print the order contract , The data needed for processing should be obtained from the presentation layer or data layer .
③ The data layer . The data layer is equivalent to the second layer C/S Servers in the architecture , Responsible for DBMS Management and control of .
3、 ... and 、B/S framework
be based on B/S Architecture software , System installation 、 Modification and maintenance are all solved on the server side . When users use the system , You need only one browser to run all the modules . It really does “ Zero client ” The function of , It's easy to automatically upgrade at run time .B/S The architecture also provides heterogeneous machines 、 Heterogeneous network 、 Online heterogeneous application services 、 Networking, etc .
And C/S Compared with the architecture ,B/S The architecture also has many shortcomings , for example :
①B/S The architecture lacks support for dynamic pages , There is no integration of effective database processing functions .
②B/S The system expansion capability of the architecture is poor , Security is difficult to control .
③ use B/S Application system of architecture , In terms of response speed such as data query , Far below C/S Architecture .
④B/S The data submission of the architecture is generally based on the page , The dynamic interaction of data is not strong , Not conducive to online transaction processing OLTP application .
Advantages of multi tier architecture :
Developers can focus on just one layer of the entire structure ;
It's easy to replace the original implementation with a new one ;
Can reduce layer to layer dependency ;
Conducive to standardization ;
It is conducive to the reuse of logic at all levels ;
Extensibility is strong . Different layers are responsible for different layers ;
High safety . The client can only access the data layer through the logical layer , Reduced entry points , Shielding many dangerous system functions .
The project structure is clearer , More clear division of labor , Good for later maintenance and upgrade .
Disadvantages of multi tier architecture :
Strict layering can lead to performance problems , It depends on the number of layers .
It is not always easy to establish a clear layered architecture .
Four 、 Service Oriented Architecture SOA
SOA All functions in the architecture are defined as independent services . Services complete the overall logic of business through interaction and coordination . All the services
Connect through the service bus or process manager . This loosely coupled architecture makes it unnecessary to consider the internal implementation details of each service in the interaction process , And on what platform .
SOA The architecture divides the different functional units of the application into multiple subsystems according to the service modules , Advantages of doing so :
(1) Split the system into service modules , Each module is developed independently , Independent deployment , They don't influence each other , The coupling between modules is greatly reduced , Different technologies can be used behind each service module ;
(2) Split the project into several subprojects , Different teams are responsible for different subprojects , Greatly improve the development and production efficiency of the team ;
(3) When adding a business subsystem, you only need to add a sub application project , Calling the service can quickly assemble sub applications , Improve the reusability of the program , Business innovation can be carried out more quickly ;
(4) Flexible distributed deployment , Better support for online business .
stay SOA Architecture , Inherits various principles from object and component design , for example , Encapsulation and self-contained . Those that guarantee service flexibility 、 Design principles of loose coupling and reusability , Yes SOA Architecture is also very important . About services , Some common design principles are as follows :
(1) Clearly defined interfaces . The service requester relies on the service specification to invoke the service , therefore , The service definition must be stable for a long time , Once published , Can't change at will ; The definition of services should be as clear as possible , Reduce inappropriate use by requesters ; Don't let the requester see the private data inside the service .
(2) Self contained and modular . Services encapsulate those that are stable in business 、 Recurring activities and components , The functional entity that implements the service is completely independent , Deploy independently 、 version control 、 Self management and recovery .
SOA Key technologies in Architecture :
(1)SOAP: Simple object access protocol ,Simple Object Access Protocol
(2)WSDL:Web Service description language ,Web Services Description Language
(3)UDDI: Universal description 、 Discovery and integration ,Universal Description Discovery and Integration
WSDL Used to describe services ,UDDI To register and find services , and SOAP As the transport layer , Used to send messages between consumers and service providers , A consumer can be in UDDI Registry lookup service , Access to services WSDL describe , And then through SOAP To call the service .
(4)REST
REST The following design concepts and criteria are proposed :
① Everything on the network is abstracted as resources .
② Each resource corresponds to a unique resource ID .
③ Operate resources through common connector interface .
④ Various operations on resources will not change the resource ID .
⑤ All operations are stateless .
at present , Realization SOA There are many methods , The mainstream ways are Web Service、 Enterprise service bus and service registry .
(1)Web Service
stay Web Service(Web service ) In the solution of , There are three job roles , Service provider and service requester are necessary , The service registry is an optional role . The interaction and operation between them constitute SOA An implementation architecture of .
(2) Service registry
Service registry (service registry) Although it also has the function of runtime , But mainly in SOA Use... In design . It provides
Strategy execution point (Policy Enforcement Point,PEP), At this point , The service can be SOA Register in , So that it can be found And use . The service registry can include configurations about services and related artifacts 、 Compliance and constraint documentation . In theory , Any help Service registration 、 Discover and find service contracts 、 Metadata and policy information base 、 database 、 A directory or other node can be considered a The registry . Most commercial service registration products support service registration 、 Service location and service binding functions .
(3) Enterprise service bus ESB
yes SOA An implementation of , ESB In service-oriented architecture, it plays the role of bus , Connect and integrate various services , The main work is use :
Describe the metadata and service registration management of the service ;
Data is passed between the requester and the service provider , And the ability to convert these data , And support a Some modes, such as synchronous mode 、 Asynchronous mode, etc ;
Find out 、 route 、 The ability to match and choose , To support dynamic interaction between services , Decouple service requesters from service providers . Senior one Some ability , Including support for security 、 Service quality assurance 、 Manageability and load balancing .
5、 ... and 、 Microservice architecture
Advantages of microservices :
(1) Each microservice is small , This focuses on a specific business function or business requirement .
(2) Microservices can be developed individually by small teams , This small group is 2 To 5 The group of developers .
(3) Microservices are loosely coupled , It's a functional service , Both in the development and deployment phases are independent .
(4) Microservices can be developed in different languages .
(5) De centralization . Each microservice has its own storage capabilities , You can have your own database . You can also have a unified database .
Disadvantages of microservices :
(1) It's hard to implement functionality across services without distributed transactions
(2) Testing is more difficult
(3) Cross service implementation requires close collaboration between teams
(4) Complex deployment
In microservices , Application gateway API The role of :
(1) Provide a unified entrance
(2) It can carry out security management such as authority and identity authentication
(3) The current can be limited according to the flow
(4) Data caching
(5) Performance monitoring, etc
(6) Exception retry
(7) service degradation
6、 ... and 、 Lightweight Architecture
(1)SSH: refer to Struts2( Be a front-end controller ),Spring( Manage components at all levels ),Hibernate( Responsible for the persistence layer )
(2)SSM: refer to SpringMVC( Be a front-end controller ),Spring( Manage components at all levels ),Mybatis( Responsible for the persistence layer )
Hibernate And Mybatis difference :
① In terms of development : In the process of project development , In terms of speed ,hibernate In development ,sql The statement has been encapsulated , Directly available , Accelerate system development ;Mybatis It's semi-automatic ,sql It needs to be done by hand , A little fussy .
sql Optimization :Hibernate Automatic generation sql, Some sentences are more complicated , It will consume more performance ;Mybatis Write by hand sql, Avoid unnecessary queries , Improve system performance ;
③ Object management :Hibernate It's a complete object - The framework of Relationship Mapping , In the development project , There's no need to pay too much attention to the underlying implementation , Just manage the object ;Mybatis You need to manage the mapping relationship yourself ;
④ Cache :Hibernate If dirty data occurs when using L2 cache , The system will report an error and prompt .Mybatis No error is reported for dirty reading .
原网站

版权声明
本文为[variation8]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270538126031.html