This is the 12th day of my participation in the August Text Challenge.More challenges in August

Workflow System

We wired together a number of different processing modules to produce a Directed Acyclic Graph/DAG, called a Workflow System, with its own desired result.

  1. Copying model
  2. Filtering mode
  3. Separation mode
  4. Merger mode

Copier Pattern

Tony plot mode is usually to completely copy data in a single data processing module to two or more data processing modules, and then to be processed by different data processing modules. Workflow system diagrams are usually shown below.

Filter Pattern

Filtering mode filters out data that does not meet specific criteria. After the dataset has passed through the data processing module, the dataset is reduced to only eligible data. Workflow system diagrams are usually shown below.

Splitter Pattern

If you’re working with a data set and you don’t want to throw away any of the data in it, but you want to sort the data into different categories for processing, you need to use split mode to process the data. Its workflow system diagram is usually shown below.

Joiner Pattern

The merge pattern brings together multiple disparate data sets into a single aggregate data set, which is then processed in a workflow.

practice

The problem

In an airline reservation system, we need to handle functions such as user registration, ticket purchase, and 24 hours prior to departure. In this whole process, which design patterns are used in the data processing of the system?

answer

1. Register

Merge mode (because the registration channels may have different channels such as mobile phone number registration, email registration, wechat registration, etc., it is necessary to merge)

2. Buy airline tickets

Filter + merge (first filter out the flight ticket information searched by the user, and then find out the qualified tickets because they may come from different channels, so they need to be merged and returned to the user)

3. Remind

Copy + filter + separate

  1. Filter: filter out users and tickets that need to be reminded according to time, place and other factors
  2. Replication: It may be necessary to process the same piece of data differently (email notification or phone notification or SMS notification) for users who check multiple notification methods.
  3. Split: Divide the previously filtered users into three groups (email notification + phone notification + SMS notification).