This may be just a semantic discord, but this push/pull debate has such a mental strain on many folks (myself included) so it'd be nice if someone could help clarify this for me.
When you say it's "both push and pull", do you really mean it's *neither* push nor pull? Say you have `A -> B`. `A` sending an IP to `B` doesn't really effect `B` in any way. `B` can choose to read from the connection now, read later, or never at all (even when the connection is not full). Likewise, `B` blocking because there's nothing in the connection doesn't "invoke" `A` for more data in any way; in fact, `A` does not even know `B` is waiting on data from it. Contrast this from a push system, where `B` would be "invoked" when there's data (basically conventional imperative programming), and from a pull system, where `A` would keep "invoking" upstream subroutines for more data until things run out (basically lazily evaluated languages).
I know; I know that when implementing an FBP system, we have to throw some theories out the window to make it work under the hood, but when reasoning about FBP programs, I think FBP renders pull vs push irrelevant. Am I on the right track here?
On Thursday, March 5, 2015 at 3:34:31 PM UTC-5, John Cowan wrote:Humberto Madeira scripsit:
> The presenter refers to MS LINQ as an example of the pull-style and the Rx
> (Reactive Extensions) Framework as an example of push-style
>
> LINQ seems closer to FBP, but with some significant elements missing
> (although it seemed to me that it could probably be extended in such a way
> as to make up the difference)
FBP is both push-style and pull-style: components pull when they read
and push when they write, the same as the filesystem API. This is also
true of proper Unix pipes and filters.
--
John Cowan http://www.ccil.org/~cowan co...@ccil.org
We are lost, lost. No name, no business, no Precious, nothing. Only empty.
Only hungry: yes, we are hungry. A few little fishes, nassty bony little
fishes, for a poor creature, and they say death. So wise they are; so just,
so very just. --Gollum
--
You received this message because you are subscribed to the Google Groups "Flow Based Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-progra...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Flow Based Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-programming+unsubscri...@googlegroups.com.
Yes I think that sounds like a very promising approach!
The discussion of push/pull was interesting too! I had never understood why people insist on describing FBP as either push or pull!
John, one of my quibbles: I haven't used a special IP for end of stream since AMPS - the problem this caused was that, when you have a many-to-one connection, all of these special IPs somehow have to be dropped except the last one. I actually don't remember how or when I did this!
Since AMPS the rule has been that a process closes down when all immediate upstream processes have closed down and all upstream connections are empty. IMO actually a simpler mental model!
Regards,
Paul
Right. I'm with you on that, but that applies to a UI "engine", which works more like UDP than FBP packets. And that model would make sense as we don't want back pressure in this case. Though, my thoughts are that you could use FBP is handle everything else. The setup is basically having a monolithic component that handles all the rendering and you feed IPs from the various processes, each of which represents an on-screen object/component/area. The monolithic component (i.e. the rendering engine) would drop IPs as needed and should, if possible, be given the highest priority by the system. Do you think that model makes sense?
--
You received this message because you are subscribed to the Google Groups "Flow Based Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flow-based-progra...@googlegroups.com.
On Mar 17, 2015 2:04 PM, <co...@ccil.org> wrote:
>
>
> I built them into JavaFBP if you haven't removed them since, and the
> reason is to make components like Concatenate possible: read all the IPs
> from one input port in an array, then all the IPs from the next, etc.
> Without explicit EOS, that can't be done.
>
> > Since AMPS the rule has been that a process closes down when all immediate
> > upstream processes have closed down and all upstream connections are
> > empty. IMO actually a simpler mental model!
I don't have a problem with Concatenate! Receive will return a null pointer when the upstream processes of that array element have all closed down, and the connection is empty. It works fine! I haven't seen an EOS IP for years - sorry, John!
>
> What about the backwards kill? You still need that for a component
> like Head, which transmits the first N IPs from its input port and
> copies them to its output port and then shuts down. (N comes from an
> IIP, of course). Once Head has terminated, its predecessor needs to
> terminate too, or it'll wait forever.
Right! The close input port method does that.
Regards,
Paul
>
> --
Not the same, John. You said 'the framework supplies an "end of input" packet' - my implementations simply return null from "receive" - no special IP is created.
Regards,
Paul