This link has been bookmarked by 8 people . It was first bookmarked on 26 Apr 2008, by Scott Moody.
-
30 Nov 08
David RobertsAfter reading J.P. Morrison's book Flow-Based Programming, I thought it would be interesting to implement a driver in Python to try it out. I decided to not go the multi-threaded approach and instead implement the driver using Python's generator facility.
python library code opensource programming dataflow concurrency data flow toread
-
09 May 08
-
27 Apr 08
-
26 Apr 08
-
After reading J.P. Morrison's interesting book Flow-Based Programming, I thought it would be interesting to implement a driver in Python to try it out.
However, I decided not to go the standard multi-threaded asynchronous approach and instead implement the driver using Python's generator facility.
The results were interesting, but the implementation lacks a few key features that the standard Flow-Based Programming model has. The most important of which is the inability to make loops in the graph.
Creating graphs by hand by specifying edges in a list is a bit tedious, and I am led to believe that a graphical process modeler would be required for this kind of programming to be very productive.
Usage
A component is defined as a Python function. Using the @component decorator changes the function into a component that can be attached to other components or used independently.
Arguments to the function specify component ports, and arguments to the decorator specify the type of each port.
To make a simple add component that has two IN ports and one OUT port:
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.