Software System Architecture

Reprinted: https://blog.csdn.net/weixin_42672777/article/details/102622846

Software Architecture
Concept

Overview: Software architecture refers to the corresponding series of abstract patterns, which can provide corresponding guidance for designing various aspects of large-scale software systems.
In essence, software architecture is a kind of system sketch. The objects described in the software architecture are directly composed of system abstract components.
To connect the various components of the system is to achieve a relatively clear and detailed implementation description of the communication between the components. In the corresponding system
implementation link, these abstract components will be refined to become real components, such as a specific class or object.
Analyzed from the object-oriented field, then the connection implementation implemented by each component is often an interface.
Software architecture provides a high-level abstraction of structure, behavior and attributes for software systems, and consists of component descriptions, component interactions, patterns guiding component integration, and constraints on these patterns
. Software architecture not only shows the correspondence between software requirements and software structure, but also specifies the
organization and topology of the entire software system, and provides some basic principles of design         decisions
.
An overview of the implementation of the organizational form of packages and layers; and in this process, there is also a description of the implementation of the status of the packages and classes in the corresponding logical view to the packages and distribution modules in the implementation view.
        Logical View: It is the most critical design class, from these design classes to the organization form of packages and subsystems, and there is also the organization form of these packages and subsystems to layers.
        Configuration view: describes the most typical configuration of various physical nodes of the platform, and there is also the situation of assigning tasks from the process view to the physical nodes. Often this view is only in the distributed system.
        Use Case View: Scenarios and Use Cases
        Process View: Describes the tasks involved in processes and threads, the configuration and interaction of these tasks, and assigns design objects and classes to tasks. Often this view is only available because the system has a particularly high degree of parallelism use

insert image description here
Architectural style
        An important issue in architectural design is whether software reuse at the architectural level can be achieved
        .
        Architectural styles define a glossary for describing systems and a set of rules to guide the construction of systems Taxonomy
Data
        flow styles: batch sequence, pipeline-filter
        call/return styles: main program/subroutine, object-oriented, hierarchy
        independent Component style: process communication, event-driven system (implicit call)
        Virtual machine style: interpreter, rule-based system
        Warehouse style: database system, hypertext system, black and white system
Data flow style
        Batch processing sequence: components are a series of fixed sequences Computational units, components interact only through data transmission, each processing step is an independent program, each step must start after the previous step is completed, the data must be complete, and pass the pipeline-filter in a holistic manner
        : Each component has a set of input and output. The component reads the input data stream, processes it internally, and then generates the output data stream. This process is usually
completed by transforming or calculating the input data stream, including by calculating and adding information. To enrich data, simplify data by concentrating and deleting, transform data and incrementally transform data by changing the recording method, etc., the components here are
called filters, and the connectors are the pipelines for data flow transmission. The output of a filter is transmitted to The difference between the input to another filter
        : the batch processing sequence must be complete at the primary level, and the next step can only be completed after the previous step, while the pipeline-filter is stream processing, and the next one can be carried out after a single end, without waiting for the whole batch
Call/return style
        main program/subroutine: single-threaded control, divide the problem into several processing steps, components are the main program and subroutines, subroutines can usually be synthesized into modules, and procedure calls are used as an interactive mechanism, that is, as connectors Role
The call relationship is hierarchical, and its semantic logic shows that the correctness of the main program depends on the correctness of the subroutines it calls. Object-oriented
        : explicit calls, components are objects, and exclusives are instances of abstract data types. In the abstract data type, the identification of data and their response operations are encapsulated. The
behavior system of the object is the action of accepting and requesting. The connector is the way of interaction between objects. Objects interact through function and process calls. Hierarchical
        structure: Components are organized into a hierarchical structure, and connectors are defined by protocols that determine how to interact between layers. Each layer provides services for the previous layer, and uses the services of the next layer. Only the adjacent layers can be seen. Through
the hierarchical structure, a large problem can be decomposed into a progressive lower problem, which can be solved step by step. It can hide the complexity of the problem, modify a certain layer, and at most impress its two adjacent layers. The disadvantage of the hierarchical structure is that there are more layers
. , the efficiency becomes lower.
Independent component style
        Process communication: independent component, component is an independent process, connector is message transmission, component is usually a named process, and the way of message transmission can be point-to-point, asynchronous or synchronous, and remote procedure call, etc.
Time-driven system: implicit call, component does not directly call a process, twenty triggers or broadcasts one or more events, the process in the component is registered in one or more events, when a certain event is triggered, the system automatically calls
the All procedures registered in this event, the triggering of an event leads to the procedure call of another module, the components in this style are anonymous procedures, they
The connection between users is often implemented by implicit calls between processes. The main advantage is that it provides strong support for software reuse and brings convenience to the maintenance and evolution of components. The disadvantage is that components abandon Virtual
machine style
        interpreter: An interpreter usually includes an interpretation engine that performs the interpretation work, a storage area containing the code to be interpreted, a data structure that records the current working state of the interpretation engine, and a record source
code The data structure of the execution progress is interpreted. The interpreter-style software summary contains a virtual machine, which can simulate the execution process of the hardware and some key applications. The disadvantage is that the execution efficiency is low. Rule-based system: The rule-based system includes rule sets
, Rule interpreter, rule/data selector and working memory are generally used in the field of artificial intelligence and DSS
warehouse style
        database system: data sharing, there are two main types of components, one is the central shared data element, which saves the data of the current system The other type is multiple independent processing units, which operate on data elements.
        Blackboard system: including knowledge source, blackboard and control. The knowledge source includes a number of different units that are independently calculated, providing only the solution to the problem. The knowledge source In response to the change of the blackboard, only the blackboard is modified. The blackboard is a
global database, including all states of the solution space of the problem domain. It is the only medium for the interaction of knowledge sources. The response of knowledge sources is controlled by the change of the state of the blackboard. Blackboard systems usually Application
In software that has no deterministic algorithm for solving problems (signal processing, problem planning, compiler optimization, etc.)
        hypertext system: components are connected to each other in a network link, and users can perform arbitrary operations between components according to human associative thinking. Jump to related components. Hypertext is a nonlinear network information organization method.
It uses nodes as the basic unit, and links are associative associations between nodes. Hypertext systems are usually used in the Internet field
The difference between the database system and the blackboard system: the database system takes data as the core, and the blackboard system takes the knowledge source as the core

insert image description here
Disadvantages of the two-tier c/s architecture
        : high development costs, complicated program design at the client point, single information content and form, different user interface styles, difficult software transplantation, difficult software maintenance and upgrades, and new technologies cannot be easily applied

insert image description here
Each layer of the three-tier c/s architecture
        remains relatively independent logically, and the logical structure of the entire system is clearer, which can improve the maintainability and scalability of the system and software,
allowing flexible and effective selection of corresponding platforms and hardware systems, and has the advantages of Good upgradeability and openness.
Each layer can be developed in parallel, and each layer can also choose the most suitable development language.
The function layer effectively isolates the presentation layer and the data layer, laying a solid foundation for strict security management. The entire system The management level is also more reasonable and controllable

insert image description here
Three-tier b/c architecture
        The b/s architecture lacks support for dynamic pages and does not integrate effective database processing functions. The
        security of the b/s architecture is difficult to control
        the application system using the b/s architecture. In terms of response speed such as data query , which is far lower than that of c/s architecture
        and b/s architecture, the data submission is generally in units of pages, and the dynamic interaction of data is not strong, which is not conducive to the application of OLTP

insert image description here
Mixed architecture style
        with different internal and external models: use c/s architecture in the internal LAN, and use b/s architecture outside the enterprise to
        check and modify different models: use b/s framework for query, and use c/s architecture for
rich Internet applications for modification (RIA)
        RIA combines the fast response and strong interactivity of the c/s architecture, and the wide spread and easy dissemination characteristics of the b/s architecture. RIA simplifies and improves the user interaction data of the
B/S architecture and
can be cached in the client end, resulting in a user interface that is more responsive than HTML-based and requires less data to and from the server

insert image description here
AJAX

insert image description here
mushup

insert image description here
The concept of service-based architecture (SOA)
        : a service is a logical combination of operations and rules to meet a certain business requirement. It includes a series of orderly activities and interactions to provide support for the realization of user goals. Service components are coarse-grained.
Traditional Components are mostly fine-grained.
The interfaces of service components are standard, mainly WSDL interfaces. Traditional firmware usually appears in the form of specific APIs. The
implementation of service components has nothing to do with language. Traditional components are bound to a specific language.
Service components can be extracted through component containers. For the Qos service, the traditional components are directly controlled by the program code. The
implementation method is
web service: the service requester finds the service provider through the service registration center (service description), and requests the service, or directly binds the service provider and initiates it directly. ask

insert image description here

 insert image description here

ESB:

  • Message routing and addressing services that provide location transparency
  • Provides management functions for service registration and naming
  • Support for multiple messaging generics
  • Supports a variety of transport protocols that can be widely used
  • Support multiple data formats and mutual conversion
  • Provides logging and monitoring capabilities

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/weixin_40593838/article/details/123711676