Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common web software architecture patterns

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "what are the common web software architecture patterns". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the common web software architecture patterns?"

1. Hierarchical mode

This pattern can be used to construct programs that can be broken down into subtask groups, each at a specific level of abstraction. Each floor provides services to the upper floor.

The most common four-tier structure of general information systems is as follows.

Presentation layer (also known as UI layer)

Application layer (also known as service layer)

Business logic layer (also known as domain layer)

Data access layer (also known as persistence layer)

Usage

General desktop applications.

E-commerce network application.

two。 Client-server mode

This mode consists of two parties: a server and multiple clients.

The server component will serve multiple client components.

Clients request services from the server, and the server provides services to these clients. In addition, the server continues to listen for client requests.

Use

Online applications such as e-mail, document sharing, and banking.

3. Master-slave mode

This model consists of two parts: master and slave. The master component distributes work among the same slave components and calculates the final result based on the results returned from the slave component.

Usage

In database replication, the master database is used as the authorization source and the slave database is synchronized with it.

Peripherals (master and slave drives) connected to a bus in a computer system.

4. Pipeline filtering mode

This pattern can be used to construct systems that generate and process data streams. Each processing step is included in the filter component. The data to be processed is passed through the pipeline. These pipes can be used for buffering or synchronization purposes.

Usage

Compiler. Continuous filters perform lexical analysis, parsing, semantic analysis, and code generation.

The workflow of bioinformatics.

5. Broker model

This pattern is used to construct a distributed system with separate components. These components can interact with each other through remote service invocations.

The agent component is responsible for coordinating communication between components.

The server publishes its functions (services and features) to the agent.

The client requests the service from the agent, which then redirects the client from its registry to the appropriate service.

Usage

Message broker software, such as Apache ActiveMQ, Apache Kafka, RabbitMQ, and JBoss messaging.

6. Point-to-point mode

In this model, a single component is called a peer component.

A peer can either request services from other peers as a client or provide services to other peers as a server.

The peer can act as a client or server, or both, and it can change its role dynamically over time.

Usage

File sharing networks such as Gnutella and G2)

Multimedia protocols, such as P2PTV and PDTP.

7. Event bus mode

This pattern mainly deals with events and has four main components: event source, event listener, channel, and event bus.

The source publishes messages to a specific channel on the event bus.

Listeners subscribe to specific channels.

Notifies the listener that it has published to its previously subscribed channel.

Usage

Android development

Notification service

8. Model View Controller Mod

This pattern, also known as the MVC pattern, divides the interactive application into three parts:

Model-contains core functions and data

View-displays information to the user (multiple views can be defined)

Controller-handles input from the user

This is done to separate the internal representation of the information from the way the information is presented to and accepted by the user. It separates components and allows effective code reuse.

Usage

The architecture of World wide Web applications in major programming languages.

Web frameworks like Django and Rails.

9. Blackboard mode

This pattern is useful for problems that do not know the deterministic solution strategy. The blackboard mode consists of three main parts.

Blackboard-structured global memory that contains objects in the solution space

Knowledge sources-specialized modules with their own representation

Control components-Select, configure, and execute modules.

All the parts can touch the blackboard. The component may produce new data objects that are added to the blackboard. The component looks for specific types of data on the blackboard and can find it by matching the patterns of existing knowledge sources.

Usage

Speech recognition

Vehicle identification and tracking

Protein structure identification

Sonar signal interpretation.

10. Parser mode

This pattern is used to design components that interpret programs written in a special language. It mainly specifies how to evaluate program lines, that is, sentences or expressions written in a particular language. The basic idea is to establish a class for each symbol of the language.

Usage

Database query language, such as SQL.

A language used to describe communication protocols.

At this point, I believe you have a deeper understanding of "what are the common web software architecture patterns?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report