What is the pro / minus of push / pull data stream models?

I am developing my own DSP application (Java w / hooks for Groovy / Jython / JRuby, plugins via OSGi, lots of JNI to navigate) in a data stream / diagram, like clean data and simulink. My current design is the push model. The user interacts with some component of the source, forcing him to transfer data to the next component and so on until the final block (usually to display or write files). There are some unique problems with this design, especially when a component is starving for input. There is no easy way to request additional data. I softened some of them with a feedback control flow, because the FFT block can broadcast that it needs more data to the original block of its chain. I was supposed to add component support like push / pull / both.

I am looking for answers regarding the merits of push vs pull vs both / hybrid. Have you done this before? What are some of the "gotchas"? How did you deal with them? Is there a better solution to this problem?

+3
source share
2 answers

Some experiences with the “mainly pull” approach in a large-scale product:

Model: Nodes build a 1: N tree, that is, each component (except the root) has 1 parent and 1..N children. Data comes almost exclusively from parents to children. Change notifications can come from any node in the tree.

: node "". , node , , . ( node ).

, . , node.

:

  • . - ( ) , , , .
  • - ( , , , )

:

  • , . ( ), . , .
  • . ( - . " " ) .
  • , , .
  • , node . ,
  • , .
  • , . .

:

Data-Pull "" , . , " ".

Data-Push , .

, . , , , . .

+1

. , , . Pull : 32 ( , , , heh).

GUI, (, , ), . , .

0

Source: https://habr.com/ru/post/1710246/


All Articles