Software design style (I)

Source: Internet
Author: User

1. MPS queue/filter style:

Features: Components in the system are loosely coupled through data streams. That is to say, the dependencies between components are only data streams, rather than interface function calls or message passing.

Typical applications: Linux operating system pipeline mechanism, in the compiler, signal processing field. For example, the compiler generally consists of lexical analysis, semantic analysis, syntax analysis,CodeMultiple processing links are generated and optimized. If each link is considered as a component, the interaction between them is a predefined data stream.

 

Other Instructions:This mode can be implemented in many different ways, including:

(1) active and passive: in the Linux example, the pipeline is designed to be passive, and the filter is designed to be active. There may be many changes in the actual implementation. For example, a filter can also be designed as a passive filter, waiting for the pipeline to actively send read and write interactions.

(2) Multi-exit pipelines: pipelines are generally designed in the form of single-entry and single-exit pipelines. The system topology is generally a linear structure. You can also design multi-exit pipelines, A pipeline provides data for several filters at the same time, and the corresponding system topology is directed graph.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.