Architectural style

An architectural style defines a glossary to describe the system and a set of rules to guide building the system.

The architectural style reflects the structural and allegorical characteristics common to many systems in the domain, and guides how to effectively organize the components into a complete system.

Data flow style

Batch sequence

Large aggregate data, no user interaction

Components are a series of cells in a fixed order and interact with each other only through data transfer. Each processing step is an independent procedure, each step must be completed after the previous one, and the data must be complete and transmitted in a holistic manner.

Pipe strainer

Streaming data, weak user interaction

Each component has a set of inputs and outputs, and the component reads the input data stream, processes it internally, and produces the output data stream. This process is usually accomplished by transforming or calculating the input data stream, including enriching the data by calculating and adding information, reducing the data by condensing and deleting, transforming the data by changing the recording mode, and incrementally transforming the data. The components here are called filters, and the connectors are conduits for data flow, transferring the output of one filter to the input of another filter.

Call return style

Main program subroutine

Process oriented

Single thread control, the problem is divided into several processing steps, the component is the main program and subroutines, subroutines can usually be composed into modules. Procedure calls act as an interaction mechanism, that is, as connectors. The call relation is hierarchical and its semantic logic shows that the correctness of the main program depends on the correctness of the subroutine it calls

object-oriented

Object method call

Artifacts are objects, which are instances of abstract data types. In abstract data types, the representation of data and their corresponding operations are encapsulated, and the behavior of an object is reflected in the actions it takes to receive and request it. Connectors are how objects interact with each other through calls to functions and procedures

hierarchy

Method calls between layers

Components are organized into a hierarchy, and connectors are defined by protocols that determine how the layers interact. Each layer provides services for the upper layer. If you use the services of the lower layer, you can only see the adjacent layer. Hierarchies allow large problems to be broken down into several small, incremental problems that can be solved step by step, hiding the complexity of the problem. Modify a layer to affect at most two adjacent layers (usually only the upper layer)

Individual component style

Process of communication

Components are independent processes, and connectors are messaging. Artifacts are typically named procedures, messages can be delivered point-to-point, asynchronous or synchronous, and remote procedure (method) calls.

Event-driven (implicit invocation)

Instead of directly invoking a procedure, a component triggers or broadcasts one or more events. Procedures in a component are registered in one or more events, and when an event is triggered, the system automatically invokes all procedures registered in that event. The firing of one event causes a procedure call in another module. Components in this style are anonymous processes, and the connectors they interact with are often implemented as implicit calls between procedures. The main advantages are that it provides powerful support for software reuse and facilitates the maintenance and evolution of components. The disadvantage is that components give up control of the system’s calculations.

Vm Style

The interpreter

An interpreter typically consists of an interpretation engine that does 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 data structure that records the progress of the source code being interpreted and executed. Interpreter-style software contains a virtual machine, which can simulate the execution process of hardware and some key applications. The disadvantage is that the execution efficiency is low.

Rules of the system

Rule-based systems include rule sets, rule interpreters, rule/data selectors, and working memory, which are commonly used in artificial intelligence and DSS.

Warehouse style

Database system

There are two main categories of components. One is the central shared data source, which saves the data state of the current system. The other is multiple independent processing units that operate on data elements.

The blackboard system

It includes three parts: knowledge source, blackboard and control. The knowledge source consists of several distinct units of independent computation that provide the knowledge to solve the problem. Knowledge sources only modify the blackboard in response to changes in the board; The blackboard is a global database, which contains all the states of the solution space of the problem domain and is the only medium for the interaction of knowledge sources. The knowledge source response is controlled by changes in blackboard state. Blackboard systems are typically used in software that does not have deterministic algorithms for problem solving (signal processing, problem planning, compiler optimization, etc.).

Hypertext system

The components are connected with each other in the form of network links, and users can jump to the relevant components at will according to the way of human associative thinking. Hypertext is a kind of non-linear network information organization method, which takes node as the basic unit and chain as the associative association between nodes. Hypertext systems are commonly used on the Internet.


“All this talk, where’s the plan?” “Don’t try so hard, the best things come when you least expect them to.”

Graph LR [software architecture style] -- > B (data flow style) A - > C () call returns style A - > D (style) independent component A - > E (virtual machine style) -- > F (warehouse style) B - > B1 (batch sequence) - > B B2 (pipeline filter) C - > C1 (the main program subroutine) C - > C2 (object-oriented) C - > C3 (hierarchy) D - > D1 (communication process) D - > D2 (event driven) E > E1 (interpreter) E -- - > E2 (rules) F F --> F2(Blackboard system) F --> F3(hypertext system)

Finally, thank you for your likes and attention. Handsome and beautiful.