当前位置:网站首页>10 common software architecture modes
10 common software architecture modes
2022-07-29 07:52:00 【sg-expert】
For the design of large enterprise level systems , You must choose a suitable architecture , It will give us the functionality and quality attributes we need . below , Understand different architectures first .

- What is architecture pattern -
According to Wikipedia ,
Architecture patterns are generic solutions to common problems in software architecture in a given context 、 Reusable solutions . Architecture pattern is similar to software design pattern , But more broadly .
In this paper , I will briefly introduce the following 10 Common architecture patterns , And its use 、 Advantages and disadvantages .
Hierarchical mode
This pattern can be used to build programs that can be decomposed into subtask groups , Each of them is at a specific level of abstraction . Every time we serve higher levels .
The most common in general information systems 4 The layers are divided as follows :
Presentation layer The presentation layer ( That is to say UI layer )
Application layer application layer ( That is the service layer )
Business logic layer Business logic layer ( It's the domain level )
Data access layer Data access layer ( Data persistence layer )
application
General desktop applications
Electronic Commerce Web Applications 
- client - Server mode -
The model consists of two parts : One server and multiple clients , The server provides services to multiple clients . The client makes a request to the server , The server provides services to these clients , after , The server continues to listen for requests from clients .
application
Online applications , E-mail 、 File sharing and banking 
- A master-slave mode -
The model is also divided into two parts : Master module and slave module . The master module distributes work between the same slave modules , And calculate the final result according to the structure returned from the module .
application
In database replication , The master database is considered the authoritative data source , And keep it in sync with the database
Peripheral devices connected to the computer system bus ( Master and slave drives )
- Pipeline filter mode -
This pattern can be used to build systems that generate and process data streams . Each processing step is contained in a filter component , Data to be processed is piped . These pipes can be used to buffer or synchronize .
application
compiler . Lexical analysis is performed using different filters in turn 、 analysis 、 Syntax analysis and code generation
Workflow in bioinformatics 
- Broker Pattern -
This pattern uses decoupled components to build distributed systems , These components can interact through remote service calls . The agent component is responsible for coordinating communication between components .
Servers put their functions ( Services and features, etc ) Publish to agent , Client requests service from agent , The agent then forwards the client request to the appropriate service according to its registry .
application
Message broker software , Such as Apache ActiveMQ, Apache Kafka, RabbitMQ and JBoss Messaging.
- P2P Pattern -
In this mode , Each individual component is called a peer ( Or peer ,peer). A peer can act as a client ( Request services from other peers ), It can also act as a server ( Providing services to other peers ). The same peer may be both a client , It's the server again , And it can dynamically change its role .
application
File sharing network , Such as Gnutella and G2
Multimedia protocol , Such as P2PTV and PDTP
Cryptocurrency based products , Such as bitcoin and blockchain 
- Things bus mode -
This pattern mainly deals with components , Yes 4 An important component : Event source 、 Event Listener 、 Channel and event bus . The event source sends the message to a specific channel on the event bus , Listeners subscribe to specific channels . When the message is sent to the channel , Listeners that subscribe to the channel receive notification of the message .
application
Android Development
Notification services 
- MVC Pattern -
This pattern divides the interactive application into three parts ,
Model —— Including core functions and data
View —— Show information to users ( You can define multiple views )
controller —— Handle user input
This is done to separate the internal representation of the data from the form of user input and presentation , This decouples the components , At the same time, it can also make efficient code reuse .
application
Internet application architecture of mainstream programming languages
Network framework , Such as Django and Rails.
- Blackboard mode -
This pattern is useful for problems where there is no definitive solution , The blackboard model consists of three parts :
blackboard —— A structured global memory , Contains objects in the solution domain
Knowledge source —— Professional module with its own meaning
Control components —— choice 、 Configuration and execution modules
All components have access to the blackboard , Components may generate new data objects to be added to the blackboard , Components look for specific types of data on the blackboard , And matching these data sources with existing patterns .
application
speech recognition
Vehicle identification and tracking
DNA Structural identification
Sonar signal interpretation 
- Interpreter mode -
This pattern is often used to design components to interpret programs written in a dedicated language , It mainly specifies how to estimate program lines , A statement or expression written in a specific language . The basic idea is to design a class for each language symbol .
application
Database query language , Such as SQL
The language used to describe a communication protocol 
- Architecture pattern comparison -

边栏推荐
- C language data type
- Space shooting Lesson 17: game over (end)
- The difference between static library and dynamic library of program
- Multi thread shopping
- [cryoEM] Introduction to FSC, Fourier shell correlation
- 技术分享| 快对讲综合调度系统
- How to get to the deep-water area when the industrial Internet goes?
- 在js中,0表示false,非0表示true
- After the access database introduces DataGridView data, an error is displayed
- Log4qt memory leak, use of heob memory detection tool
猜你喜欢

Prometheus and grafana

Jump from mapper interface to mapping file XML in idea

Measured waveform of boot capacitor short circuit and open circuit of buck circuit

Solving linear programming problems based on MATLAB

Data unit: bit, byte, word, word length

207.课程表

2022年深圳杯A题破除“尖叫效应”与“回声室效应”走出“信息茧房”

Matrix decomposition and gradient descent

Log4qt memory leak, use of heob memory detection tool

RoBERTa:A Robustly Optimized BERT Pretraining Approach
随机推荐
Joseph Ring problem
[introduction to cryoelectron microscopy] Caltech open class course notes part 3:image formation
Sqlmap(SQL注入自动化工具)
关于pip升级损坏导致的问题记录
[skill accumulation] common expressions when writing emails
Multi thread shopping
[note] the art of research - (tell a good story and argument)
Do you want to meet all the needs of customers
Jianmu continuous integration platform v2.5.2 release
功能自动化测试实施的原则以及方法有哪些?
MapReduce steps of each stage
Halcon installation and testing in vs2017, DLL configuration in vs2017
【深度学习】数据准备-pytorch自定义图像分割类数据集加载
多线程购物
《nlp入门+实战:第五章:使用pytorch中的API实现线性回归》
Space shooting Lesson 17: game over (end)
输出1234无重复的三位数
After the access database introduces DataGridView data, an error is displayed
Access数据库引入datagridview数据后,显示错误
[note] the art of research (understand the importance of the problem)