Reading Notes 03 Software Architecture

In this article, I will briefly explain the 10 kinds of common architectural patterns, as well as their usage and the pros and cons.

  1. Stratified mode
  2. The client - server mode (cs mode)
  3. Master-slave mode
  4. Pipe filter model
  5. Proxy mode
  6. Point to Point mode
  7. Event Bus mode
  8. Model - View - Mode Controller (MVC mode)
  9. Blackboard mode
  10. Interpreter pattern

1. stratified mode

This mode can be used to construct a plurality of sets of decomposed into sub-task program, each sub-task is in particular abstract level. Each layer provides services to a higher level.

 

The following are the most common general-purpose information system in four levels.

 

Presentation layer (also referred to as the UI layer)

Application layer (also called a service layer)

Business logic (also referred to as the field layer)

Data Access Layer (also called persistence layer)

usage

 

Universal Desktop Application

E-commerce web application

2. The client - server mode

The model includes a server and multiple clients. Server-side components to multiple client component to provide services. Client service requests to the server, the server provides related services. In addition, the server will continue to monitor the client's request.

 

usage

 

Online applications, such as e-mail, file sharing and storage.

3. The master-slave mode

The model consists of two parts; master and slave. Main assembly of the same sub-assemblies to assign work, and the final result is calculated according to the results returned from the slave component.

 

usage

 

The primary server is the authoritative source database and its subordinate synchronization.

In computer systems, peripheral devices connected to the bus (the main drive and the slave drives).

4. Pipe filter model

This mode can be used to build the system to generate and process the data stream. Each process step includes a filtration module. Data is transferred through the duct to be treated. These pipes can be used for synchronization or data cache.

 

usage

 

translater. Continuous filter performs lexical analysis, parsing, semantic analysis, and code generation.

Workflow Bioinformatics in.

5. Proxy mode

This mode is used to build distributed systems with decoupled components. These components interact with each other through a remote service call. Agent component responsible for coordinating communication between components.

 

Its server functions (services and features) issued to the agent. The client requests services from the agent, the agent according to the registry to redirect the client to appropriate services.

 

usage

 

News agency services, such as Apache ActiveMQ, Apache Kafka, RabbitMQ and JBoss Messaging.

6. Point to Point mode

In this mode, the same components are referred to like components. Peer either as a client to request services of other peers, can be used as the server to provide services to other peers. When a peer can act as a client or server, or both concurrently, it can dynamically change with time their roles.

 

usage

 

File-sharing networks such as Gnutella and G2)

Multimedia protocol, e.g. P2PTV and PDTP.

7. The event bus mode

This mode event process, and has four main components: an event source, the event listener, and the event channel event bus. Event Source publish messages to a specific channel on the event bus. Listeners who subscribe to a particular channel. If the listener subscription channel news release, the listener will be notified.

 

usage

 

Android Development

Guess you like

Origin www.cnblogs.com/z245894546/p/11003921.html