Software architecture style arrangement (1 data stream style)

Source: Internet
Author: User
1. Data Stream style 1.1 batch processing sequence

Each batch processing step is independent. and each step is executed sequentially. only after the current step is completed. the next step can be processed. data is transmitted between steps as a whole. (a component is a series of computing units in a fixed order, and the components communicate with each other only through data transmission. Each processing step is an independent program, and each step must start after the previous step is completed. The data must be complete and transmitted in an overall manner)

Typical batch processing applications:

L typical data processing;

L program development;

L The Bat program in Windows is a typical example of such an application.

Comparison between the batch processing style and MPs queue filter style:

L commonalities: divides tasks into a series of computing units (components) in a fixed sequence. components communicate with each other only through data transmission.

L difference: batch processing is full and highly latent. The input can be accessed randomly without cooperation and interaction. pipeline filters increase progressively, with low latency in data results, processing localization during input, and feedback and interaction.

 

.

1.2 MPs queue/Filter

Each component has a set of inputs and outputs. The component reads the input data streams, which are internally processed and then generates output data streams. This process is usually completed through the transformation and incremental computing of the input stream, including the enrichment of data by computing and adding information, the enrichment and deletion of refined data, and the conversion of data by changing the record, incrementally convert data. The output is generated before the input is completely consumed. The component is called a filter, and the connector is the pipe for data stream transmission. The output of one filter is transmitted to the input of another filter.

L advantages:

1) The software components have good concealment and high cohesion and low coupling characteristics.

Allows designers to understand the overall input/output behavior of a system as a simple synthesis of individual filter Behaviors

2) software reuse is supported. Any two filters can be connected as long as the data suitable for transmitting between two filters is provided;

3) Easy system maintenance and performance enhancement: new filters can be added to existing systems, or old filters can be replaced by improved filters;

4) supports parallel execution: each filter is completed as a separate task, so it can be parallel with other tasks.

5) convenient system analysis: for example, throughput, deadlock, etc.

L disadvantages:

1) latency increases when a long pipeline is passed.

2) The process usually becomes the batch processing structure. This is because although filters can incrementally process data, they are independent. Therefore, the designer must regard each filter as a complete conversion from input to output.

3) it is not suitable for interactive applications. This problem is especially serious when you need to incrementally display changes.

4) because there are no general standards in data transmission, each filter adds data parsing and synthesis, which leads to a reduction in system performance and increases the complexity of writing filters.

5) when maintaining or responding to two isolated but related data streams, it is not easy to use pipelines/filters.

 

Typical pipe/filter styles include shell programming in UNIX. UNIX provides a symbol to connect components (processes) and a process runtime mechanism to implement pipelines. Another example is the traditional compiler. In traditional compilers, the output of one stage (including lexical analysis, syntax analysis, semantic analysis, and code generation) is the input of another stage.

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.